|
Boost-Build : |
From: quarendont (tomq_at_[hidden])
Date: 2004-12-22 06:18:13
I think I had read the page you referenced, but I clearly hadn't
undersood it. I think I do now.
On Windows though, I don't need to explicitly add the boost library to
the link step, just the directory (the OBJ files have the name of the
library written in them in using the "auto link" facility. Can I make
use of this, or do I have to write
lib boost_filesystem : <name>libboost_filesystem-gcc-mt-d-1_31.lib
<search>c:\boost\lib ;
lib lib1 : $(SOURCES) boost_filesystem ;
Thanks for the quick response.
--- In jamboost_at_[hidden], Vladimir Prus <ghost_at_c...> wrote:
> Hi Tom,
> > I'm attempting to write a Jamfile for boost.build (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 boost.build 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:
>
>
http://boost.org/boost-build2/doc/html/bbv2/advanced/builtins/targets.html#id2549386
>
> 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 acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk