cons-discuss
[Top][All Lists]
Advanced

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

Linking against a built library


From: Lachlan O'Dea
Subject: Linking against a built library
Date: Wed, 6 Nov 2002 20:46:28 +1100

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

Hi,

I've just started looking into Cons. It's going fairly well so far. However, now I'm trying to build an executable that links against a shared library that is also built by Cons.

I'm using some code from the list archives to build the shared library itself - that works fine. But 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. It seems like LIBS is designed to reference system libraries, not those built by Cons.

One option I thought of was to modify the Program method so that it would automatically detect libraries in the parameter list, for example:

Program $cons 'test', 'test.cpp', 'mylib.so';

Except that using ".so" like that isn't really cross-platform. Currently, Program tries to treat all parameters as source code or object files.

Any thoughts on how to handle this? Am I missing something obvious?

====
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)

iD8DBQE9yOT7oBZahcUBONoRAvx+AJ92wErOnCnPRpK6TosbwTQeISepAwCeJaNR
ln6BpAXl2ZS/gU7PRhkZTBE=
=KxBB
-----END PGP SIGNATURE-----





reply via email to

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