This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: probably an old question about overriding hardcoded library search paths


On Sun, 11 Nov 2012, Charles Smith wrote:

How can I force a private copy of sqlite3 to be linked to my
application?

You can always pass /path/to/libA.a instead of -L/path/to -lA.


My ubuntu 10.04 system has sqlite3 in /usr/local/lib and /usr/lib.
I want to link my application with a private version of sqlite3.
Using -L and -l doesn't work because the additional directory is
"appended" to the search path.

No. It might give priority to dynamic libraries over static ones though. See -Bstatic in the documentation of the linker.

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]