Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-12-22 05:52:18

Hi Tom,
> I'm attempting to write a Jamfile for (version 1 or
> version 2). I need to link a DLL with an external library (a boost
> library in fact) and can't seem to get the right incantation.
> I have the libraries I need to link with in c:\boost\lib (I running
> Windows XP).
> My fist attempt was to use V2.
> In my project I had a Jamfile that looked a bit like
> SOURCES = a.cpp ;
> lib lib1 : $(SOURCES) : <include>c:\boost\include\boost-1_31 ;
> This compiled my sources fine, but obvisouly failed to link. So I
> added <search>c:/boost/lib, as in
> lib lib1 : $(SOURCES) : <include>c:\boost\include\boost-1_31
> <search>c:/boost/lib ;
> This then linked correctly. However, strangely having done a clean, it
> wouldn't compile again (jam just did nothing) until I took the
> <search> out again.

Did you read:

The second syntax does not only say "look in" c:/boost/lib, it also says that
"lib1" is not built by V2, but is "searched". You'd need either:

lib boost : : <name>libboost<whatever_you_want> <search>c:/boost/lib ;
lib lib1 : $(SOURCES) boost ;

or if Boost is present in source form, directly use it:

lib lib1 :
$(SOURCES) /some/path/libs/filesystem/build//libboost_filesystem ;

- Volodya


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