Writing a library

This is a discussion on Writing a library within the Eiffel forums in Programming Languages category; Hi ! I'm new to Eiffel and I need to write a library. I tried using Eiffelstudio by making a new project "A_TEST_LIB" and making a class "A_TEST" with a feature "print_hello_world". Then I made a second project "TEST_PROJECT" and wanted to do this: test_object : A_TEST test_object.print_hello_world But code inside "TEST_PROJECT" can't see the class "A_TEST". Can anyone tell me how to do this? That is: can anyone tell my how to write a library for eiffel? I also have another problem: IDE on Mac is very unstable so I would like to use the commandline. But if I ...

Go Back   Application Development Forum > Programming Languages > Eiffel

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 03-15-2008, 10:09 AM
g.n.mueller@gmail.com
Guest
 
Default Writing a library

Hi !

I'm new to Eiffel and I need to write a library.
I tried using Eiffelstudio by making a new project "A_TEST_LIB" and
making a
class "A_TEST" with a feature "print_hello_world".
Then I made a second project "TEST_PROJECT" and wanted to do this:
test_object : A_TEST
test_object.print_hello_world

But code inside "TEST_PROJECT" can't see the class "A_TEST".
Can anyone tell me how to do this? That is: can anyone tell my how
to write a library for eiffel?

I also have another problem:
IDE on Mac is very unstable so I would like to use the commandline.
But if I try to run "ec" I get this error:

/usr/local/share/eiffel6.1/ec/eifinit/general.cfg does not exist.
Execution impossible.


Thank you for your help!

Gloria


Reply With Quote
  #2  
Old 03-15-2008, 11:13 AM
Colin Paul Adams
Guest
 
Default Re: Writing a library

>>>>> "Gloria" == g n mueller <g.n.mueller@gmail.com> writes:

Gloria> Hi ! I'm new to Eiffel and I need to write a library. I
Gloria> tried using Eiffelstudio by making a new project
Gloria> "A_TEST_LIB" and making a class "A_TEST" with a feature
Gloria> "print_hello_world". Then I made a second project
Gloria> "TEST_PROJECT" and wanted to do this: test_object : A_TEST
Gloria> test_object.print_hello_world

You need to add the cluster that A_TEST is in to the second project.
A library in Eiffel is just a collection of clusters (which in turn is
a collection of classes).

--
Colin Adams
Preston Lancashire
Reply With Quote
  #3  
Old 03-15-2008, 12:16 PM
g.n.mueller@gmail.com
Guest
 
Default Re: Writing a library


> You need to add the cluster that A_TEST is in to the second project.
> A library in Eiffel is just a collection of clusters (which in turn is
> a collection of classes).
>
> --
> Colin Adams
> Preston Lancashire


Hi Colin

I opened TEST_PROJECT and right-clicked Libraries , selected "Add
loibrary.." and added "A_TEST_LIB" .
When I compile I get ""VD00: General configuration parsing error. A
System that was used as a library has a precompile in it: A_TEST_LIB"
What does this mean?
Thanks forhelping me!
--
Gloria
Reply With Quote
  #4  
Old 03-16-2008, 06:46 PM
Emmanuel Stapf [ES]
Guest
 
Default Re: Writing a library

> But if I try to run "ec" I get this error:
> /usr/local/share/eiffel6.1/ec/eifinit/general.cfg does not exist.
> Execution impossible.


If you do not define the ISE_EIFFEL and ISE_PLATFORM environment
variable, then EiffelStudio will assume that it is using a Unix specific
layout which seems to be your case.

Note that if you are using bash, you need to export the environment
variable that you define if you haven't done it.

Manu
Reply With Quote
  #5  
Old 03-16-2008, 06:48 PM
Emmanuel Stapf [ES]
Guest
 
Default Re: Writing a library

> When I compile I get ""VD00: General configuration parsing error. A
> System that was used as a library has a precompile in it: A_TEST_LIB"


Basically, a library has to be standalone. Precompiled libraries can
only be used in non-library project. So to solve your problem, simply
edit the A_TEST_LIB configuration file and remove the reference to the
precompiled library.

Manu
Reply With Quote
  #6  
Old 04-19-2008, 10:03 PM
g.n.mueller@gmail.com
Guest
 
Default Re: Writing a library

On 17 Mrz., 07:46, "Emmanuel Stapf [ES]"
<manus_no_s...@eiffel.nospam.com> wrote:
> > But if I try to run "ec" I get this error:
> > /usr/local/share/eiffel6.1/ec/eifinit/general.cfg does not exist.
> > Execution impossible.

>
> If you do not define the ISE_EIFFEL and ISE_PLATFORM environment
> variable, then EiffelStudio will assume that it is using a Unix specific
> layout which seems to be your case.
>
> Note that if you are using bash, you need to export the environment
> variable that you define if you haven't done it.
>
> Manu


Dear Manu

Thank you so much! I only saw now that I got a reply in this thread!
In the meantime I worked with EiffelStudio : (
Now I did this:

export ISE_EIFFEL=/opt/local/var/macports/software/eiffelstudio/
6.1.71477_1/Applications/MacPorts/Eiffel61
export ISE_PLATFORM=macosx

And when I type "ec" and then return I get this:

WARNING: the path $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/bin points to
a non-existing directory.

Now I'll try to find the right platform identifier using google. If
you know it I'd be glad if you
could post it here.

Thank you!

Gloria

Reply With Quote
  #7  
Old 04-19-2008, 10:09 PM
g.n.mueller@gmail.com
Guest
 
Default Re: Writing a library


Ok the error goes away using this:

export ISE_PLATFORM=macosx-x86

Reply With Quote
  #8  
Old 04-19-2008, 10:10 PM
g.n.mueller@gmail.com
Guest
 
Default Re: Writing a library


Ok the error goes away using this:

export ISE_PLATFORM=macosx-x86

Reply With Quote
  #9  
Old 04-19-2008, 10:29 PM
g.n.mueller@gmail.com
Guest
 
Default Re: Writing a library

AWESOME! It works!

ec -config myproject.ecf

Thank you so much!

Gloria
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:02 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.