Re: Organization of libraries and projects

"Cyril ADRIAN" <[email protected]> Thu, 7 Dec 2006 17:20:07 +0100
Newsgroups gmane.comp.lang.eiffel.smalleiffel
Message-ID <[email protected]>
Hi Henk,

Sorry for answering this late...

On 10/29/06, Henk Boom <[email protected]> wrote:
> My first question is, if I cannot rely on a directory structure which
> is set in stone, how do I tell my projects (in their ace files) where
> to find my libraries and such. Is using environment variables really
> the best way? If so, where should they be set? It doesn't seem right
> to stick them in my .serc, which I would have to search through every
> time I wanted to change it. If I understand correctly, this is what
> configure scripts are for in a lot of c/c++ projects. Would there be a
> similar way to define these locations locally without having to change
> my .ace file for every computer? (which is difficult if it is in the
> repository)

What you have to use, if you don't already do so, is the svn compiler
(instead of 2.2 or even 2.3b1). In the latest version configuration
files are aggregated. It means that you can have one or more of those
files, they will be read and overload previous ones in this order:
  - /etc/serc
  - ~/.serc
  - $SmartEiffel

To solve your problem, I think the most convenient would be:
  - keep your default serc file (either /etc/serc or .serc) as
provided by the installer
  - create a file, local to each computer you work on, with the same
structure as .serc but with *only* the relevant fields (something like
extract below)
  - use the SmartEiffel environment file to point to that file

Now the extract would look like:
--8<--------
[Environment]
path_local: /your/local/project/path/
[Loadpath]
local: ${path_local}loadpath.se
-------->8--

> My other question is actually one I asked here a while back, and never
> found a satisfying answer to. It involves wrapping and using libpng.
(...)
> I don't want to move back to using externs, but unless
> there is some way to fix this, I don't seem much choice.

Plugins are included far after the .h file begins to be generated. I
don't know if the latest changes in the C backend by Dominique can
help in this regard. Dominique?

Maybe you could do some C magic with a dummy .h file that undefines
_SETJMP_H or something, before #including png.h? (I don't know how
portable it is though-- I suspect not much.)

Best regards,
--=20
Cyril ADRIAN - http://www.cadrian.net/~cyril

Vt Sol inter planetas,
Ita MVSICA inter Artes Liberales
in medio radiat
-- Heinrich Sch=FCtz, 1640