|
From: | Sid Touati |
Subject: | howto select the static version of a library with -l (but not for all the other libraries) |
Date: | Mon, 07 Aug 2006 18:05:28 +0200 |
User-agent: | Thunderbird 1.5 (X11/20051201) |
Hello everyone,I have a question that I am unable to solve by myself (and also by googling; other computer scientists colleagues fail too).
To give a concrete example, suppose that I have a g++ compiler command line such as : g++ -O0 -g3 -o sira sira.o RG.o intLPSIRA.o siraloop.o anyoption.o -L/home/touati/lib -L/usr/ilog/cplex100/lib/x86_rhel4.0_3.4/static_pic -L/home/touati/lp_solve_5.5/lib -L/usr/lib -llpsolve55 -lpthread -lm -lcplex -lDDG -lG -lL -lboost_filesystem
And I would like to select the static version of libboost_filesystem. That is, I would like to tell to the linker to use libboost_filesystem.a as a the library -lboost_filesystem. We have experimented two solutions : - with -static g++ option : this option makes g++ to consider static libraries for all other libraries. But we would like to consider it for only one library, not all of them.
- by providing libboost_filesystem.a as a direct object file to the line command, but this solution would not be portable to all UNIX platforms.
Does someone has a suggestion ? Yours Sincerely Sid
[Prev in Thread] | Current Thread | [Next in Thread] |