[odb-users] RE: Linux Linking ODB - libtool vs g++
Boris Kolpackov
boris at codesynthesis.com
Mon Aug 29 13:01:51 EDT 2011
Hi Thomas,
Szumowski, Thomas <thomas.szumowski at lmco.com> writes:
> I noticed the main difference between the libtool and g++ calls were
> libtools inclusion of "-Wl,-rpath,/usr/local/lib". Adding that to g++
> and naturally it works fine. So perhaps I just need to ensure I have
> that added in as needed?
Hm, this gets stranger. Here is a quote from the GNU ld man pages that
may explain why this helps:
"The -rpath option is also used when locating shared objects which are
needed by shared objects explicitly included in the link"
So it seems like for some reason ld cannot locate libsqlite3.so (which
I assume is in /usr/local/lib) even though it can resolve -lodb-sqlite
and -lodb without any problems. Very strange.
Can you try this:
$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
And then run the vanilla g++ command?
As well as this (without the LD_LIBRARY_PATH):
$ g++ -L/usr/local/lib ...
Boris
More information about the odb-users
mailing list