public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* linking problems / "undefined reference" / link path search order
@ 2003-12-20 10:01 Christian Neumair
  2003-12-20 12:10 ` Christian Neumair
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Neumair @ 2003-12-20 10:01 UTC (permalink / raw)
  To: gcc-help

I'm trying to link a program but I fail. The following reflects my
linking conditions:
- /usr/lib contains some libraries, let's call them libx, liby and libz.
- $(prefix)/somedir contains the same libraries (libx, liby, libz), but
those are newer, so they have more functions exposed.
- my Makefile.am contains the following linker flags:
"-Wl,--export-dynamic -pthread -L$(prefix)/somedir -lx -ly -lz".

Now, the linker obviously tries to link against libx, liby and libz in /
usr/lib instead of those in new prefix. Is there any way to override
this behavior? I already tried to set the environment variable
LD_LIBRARY_PATH to "$(prefix)/somedir", but it didn't work either.
I couldn't find any useful information in man gcc.

regs,
 Chris

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

* Re: linking problems / "undefined reference" / link path search order
  2003-12-20 10:01 linking problems / "undefined reference" / link path search order Christian Neumair
@ 2003-12-20 12:10 ` Christian Neumair
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Neumair @ 2003-12-20 12:10 UTC (permalink / raw)
  To: gcc-help

On Sa, 2003-12-20 at 10:53 +0100, Christian Neumair wrote:
> I'm trying to link a program but I fail. The following reflects my
> linking conditions:
> - /usr/lib contains some libraries, let's call them libx, liby and libz.
> - $(prefix)/somedir contains the same libraries (libx, liby, libz), but
> those are newer, so they have more functions exposed.
> - my Makefile.am contains the following linker flags:
> "-Wl,--export-dynamic -pthread -L$(prefix)/somedir -lx -ly -lz".
> 
> Now, the linker obviously tries to link against libx, liby and libz in /
> usr/lib instead of those in new prefix. Is there any way to override
> this behavior? I already tried to set the environment variable
> LD_LIBRARY_PATH to "$(prefix)/somedir", but it didn't work either.
> I couldn't find any useful information in man gcc.
Sorry for bugging you, it was libtools fault.
For further information, refer to [1].

regs,
 Chris

[1] http://mail.gnu.org/archive/html/libtool/2003-10/msg00068.html

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

end of thread, other threads:[~2003-12-20 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-20 10:01 linking problems / "undefined reference" / link path search order Christian Neumair
2003-12-20 12:10 ` Christian Neumair

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