Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-12-09 02:42:34

Hi Caleb,
> I'm trying to write a Jamfile.v2 for a project I have that is
> dependent on a handful of 3rd party libraries. I'm having difficulty
> getting the proper <includes> to be picked up and I'm stumped.
> Here's an example:
> lib tools : [ glob src/*.cpp ] log4cplus tibrvcpp : <include>include ;
> lib log4cplus : : <search>/path/to/log4cplus/lib : :
> <include>/path/to/log4cplus/include ;
> lib tibrv : : <search>/path/to/tibrv/lib : :
> <include>/path/to/tibrv/include ;
> lib tibrvcpp : tibrv : <search>/path/to/tibrv/lib : :
> <include>/path/to/tibrv/include ;
> Basically the compiler is not being called with the <include> paths
> for log4cplus or tibrv/tibrvcpp when building the object files that
> make up "tools". It only gets the -Iinclude argument.
> What is the right way to do this?

I can't reproduce the problem. I have a setup with a single file Jamroot

lib tools : [ glob *.cpp ] log4cplus : <include>include ;

lib log4cplus : : <search>/path/to/log4cplus/lib : :
<include>/path/to/log4cplus/include ;

and a single empty file a.cpp. I get this command:

gcc.compile.c++ bin/gcc-3.4/debug/a.o

"g++-3.4" -Wall -ftemplate-depth-100 -O0 -fno-inline -g -fPIC
-I"/path/to/log4cplus/include" -I"include" -c -o "bin/gcc-3.4/debug/a.o"

It still works when I add other targets. When building with msvc, the output

echo >> "bin/msvc/debug/a_cpp.rsp"

echo "-I/path/to/log4cplus/include" >> "bin/msvc/debug/a_cpp.rsp"
echo "-I/path/to/tibrv/include" >> "bin/msvc/debug/a_cpp.rsp"
echo "-Iinclude" >> "bin/msvc/debug/a_cpp.rsp"

msvc.compile.c++ bin/msvc/debug/a.o bin/msvc/debug/a_cpp.rsp

/Zm800 -nologo -TP /Z7 /Od /Ob0 /EHsc /GR /MDd
@"bin/msvc/debug/a_cpp.rsp" -c -Fo"bin/msvc/debug/a.o"

Note that the command line does not include -I options, but they are stored in
RSP files which is used by the compiler. This is a recent change, made
because a user had too many include paths and ran out of command line length

If on your project you really don't get include paths added, I'd need a
reproducible test case from you.

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at