public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* linking libraries without name prefix/suffix
@ 2007-10-25 10:11 k wayne
  2007-10-25 12:44 ` John Love-Jensen
  0 siblings, 1 reply; 2+ messages in thread
From: k wayne @ 2007-10-25 10:11 UTC (permalink / raw)
  To: gcc-help

hi,
i hope this is the right mailinglist for this, my apologies this is
not the case :)

however, i need to link (through invokation of g++, if possible) a
library that does not have the "libxxx.a" scheme, so i would like to
make g++ not prefix the library name with "lib" and suffix it with
".a". if i understood the gcc manual correctly, i could specify the
libarary without the "-l" option, but then the library paths (plus
those specified with "-L") would not be searched. unfortunately, i
need these paths to be searched, because i do not know the exact paths
of the libraries since i am trying to write a makefile for
compilation.
by the way, i'm trying hard to avoid external tools such as the
autotools, so i hope there is a way to solve my little problem in
another way :)

thank you in advance

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linking libraries without name prefix/suffix
  2007-10-25 10:11 linking libraries without name prefix/suffix k wayne
@ 2007-10-25 12:44 ` John Love-Jensen
  0 siblings, 0 replies; 2+ messages in thread
From: John Love-Jensen @ 2007-10-25 12:44 UTC (permalink / raw)
  To: k wayne, MSX to GCC

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-25 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-25 10:11 linking libraries without name prefix/suffix k wayne
2007-10-25 12:44 ` John Love-Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).