cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking against a built library


From: Lachlan O'Dea
Subject: Re: Linking against a built library
Date: Thu, 7 Nov 2002 10:47:26 +1100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday, Nov 7, 2002, at 01:34 Australia/Melbourne, Gary Oberbrunner wrote:


On Wednesday, November 6, 2002, at 04:46  AM, Lachlan O'Dea wrote:

... I'm trying to build an executable that links against a shared
library that is also built by Cons.

...I can't see an easy way to specify that a particular program should

be linked against this library. Using LIBS doesn't fit that well,
since it's global and I think I have to work out the paths myself.
Also, since my SharedLibrary method is basically a copy of the Program

method, it also uses LIBS, which can result in a circular dependency.

I suggest you use two different environments, one for building the lib
and one for your program.  That gives you more flexibility anyway.
Just derive one from the other and change the LIBS, and whatever else
you need to change.

Of course, that works perfectly. I actually tried that approach when trying to build both static and shared versions of a library. It didn't work in that case because both targets depended on the same source files. It didn't occur to me that the problem doesn't exist in the case of building an executable.

Thanks!

====
Lachlan O'Dea <address@hidden>       Computer Associates Pty Ltd
Webmaster                              Vet - Anti-Virus Software
http://www.vet.com.au/                 Ich bin CA!


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)

iD8DBQE9yao9oBZahcUBONoRAqrWAJ9pB7cAqEioN1EulFBVLeXAVOJHRgCgtFub
b/sCo5xkdkxcZOopCRRZqAE=
=gpuC
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]