Linking against a built library
Lachlan O'Dea <[email protected]> Wed, 6 Nov 2002 20:46:28 +1100
| Newsgroups | gmane.comp.gnu.cons.general |
|---|---|
| Message-ID | <[email protected]> |
-----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 <[email protected]> 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----- _______________________________________________ [email protected] http://mail.gnu.org/mailman/listinfo/cons-discuss Cons URL: http://www.dsmit.com/cons/