Re: Linking against a built library

Gary Oberbrunner <[email protected]> Wed, 6 Nov 2002 09:34:37 -0500
Newsgroups gmane.comp.gnu.cons.general
Message-ID <[email protected]>
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.

-- Gary



_______________________________________________
[email protected]
http://mail.gnu.org/mailman/listinfo/cons-discuss
Cons URL: http://www.dsmit.com/cons/