This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: linking libraries without name prefix/suffix
- From: John Love-Jensen <eljay at adobe dot com>
- To: k wayne <pleexed at gmail dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Thu, 25 Oct 2007 06:25:37 -0500
- Subject: Re: linking libraries without name prefix/suffix
Hi k wayne,
> i need to link (through invokation of g++, if possible) a
> library that does not have the "libxxx.a" scheme...
Let's assume the "what should be a library but isn't because it doesn't
follow the naming requirements for being a library (lib prefix and .a
suffix)" is called ImReallyALibraryDammit.
Do this in that directory, say /secret/library/location, which contains
ImReallyALibraryDammit:
ln -s ImReallyALibraryDammit libImReallyALibraryDammit.a
Then the linker will be able to locate the malnamed library. So this will
now work:
g++ foo.cpp -L/secret/library/location -lImReallyALibraryDammit
HTH,
--Eljay