|
Boost-Build : |
From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2004-12-20 15:35:09
According to the BBV2 docs (e.g.
http://boost.sourceforge.net/boost-build2/doc/html/bbv2/faq/dll-path.html),
hardcode-dll-paths is supposed to be enabled by default. Yet when I
build an executable, it is unable to find libraries not in my
LD_LIBRARY_PATH.
Here is my Jamfile.v2:
BOOST_ROOT = /home/nbde52d/src/boost ;
project
: requirements <include>$(BOOST_ROOT)
;
exe xml : xml.cpp xml++ xml2 ;
exe xpath : xpath.cpp xml++ xml2 ;
lib xml++
: : <search>/home/ietdev/tools/linux-i686/libxml++-1.0.4/lib
<name>xml++-1.0
: : <include>/home/ietdev/tools/linux-i686/libxml++-1.0.4/include/libxml++-1.0
;
lib xml2 : : <search>/usr/lib : : <include>/usr/include/libxml2 ;
Here is the output of bjam --v2 -d2:
...found 68 targets...
...updating 7 targets...
MkDir1 bin
mkdir "bin"
MkDir1 bin/gcc
mkdir "bin/gcc"
MkDir1 bin/gcc/debug
mkdir "bin/gcc/debug"
gcc.compile.c++ bin/gcc/debug/xml.o
"g++" -Wall -ftemplate-depth-100 -O0 -fno-inline -g
-I"/home/ietdev/tools/linux-i686/libxml++-1.0.4/include/libxml++-1.0"
-I"/home/nbde52d/src/boost" -I"/usr/include/libxml2" -c -o
"bin/gcc/debug/xml.o" "xml.cpp"
gcc.link bin/gcc/debug/xml
"g++" -L"/home/ietdev/tools/linux-i686/libxml++-1.0.4/lib"
-L"/usr/lib" -o "bin/gcc/debug/xml" "bin/gcc/debug/xml.o"
-lxml2 -lxml++-1.0 -g
gcc.compile.c++ bin/gcc/debug/xpath.o
"g++" -Wall -ftemplate-depth-100 -O0 -fno-inline -g
-I"/home/ietdev/tools/linux-i686/libxml++-1.0.4/include/libxml++-1.0"
-I"/home/nbde52d/src/boost" -I"/usr/include/libxml2" -c -o
"bin/gcc/debug/xpath.o" "xpath.cpp"
gcc.link bin/gcc/debug/xpath
"g++" -L"/home/ietdev/tools/linux-i686/libxml++-1.0.4/lib"
-L"/usr/lib" -o "bin/gcc/debug/xpath" "bin/gcc/debug/xpath.o"
-lxml2 -lxml++-1.0 -g
...updated 7 targets...
I would expect to see
-Wl,-rpath,/home/ietdev/tools/linux-i686/libxml++-1.0.4/lib in the
link lines, but it is not there. From looking at tools/gcc.jam, it
appears that this only ever enters the picture when building libraries
and not executables.
What am I missing?
-- Caleb Epstein caleb dot epstein at gmail dot com
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk