Boost logo

Boost-Build :

From: Phillip Seaver (phil_at_[hidden])
Date: 2006-11-16 14:12:50


Michael Thomas Zehender wrote, on 11/16/2006 8:16 AM:
> Hello,
>
> I'm new to the boost.build system, yesterday I've installed bjam and
> boost.build and at the first glance it was very easy to use and powerful.
> I set up my project according to the tuturials and documentation and
> ran into a problem and didn't find a solution.
>
> My Problem:
>
> I have a library say TEST1 in one subproject dependent on a library
> say TEST2 in another subproject. I've put it in the sources list, but
> it isn't handled right.
> On the one hand it even doesn't compile the library TEST2 in the other
> subproject when I run bjam to compile library TEST1 on the other hand
> the library is passed to the linking process like an installed library
> ( -lTEST2 ). The result is:
>
> ~/TestDir1 michael$ bjam --v2
> ...found 28 targets...
> ...updating 1 target...
> darwin.link.dll ../TestDir1/bin/darwin/debug/libTEST1.dylib
> /usr/bin/libtool: can't locate file for: -lTEST2
> /usr/bin/libtool: file: -lTEST2 is not an object file (not allowed in
> a library)
> ...
>
> Firstly the problem is, that it obviously can't find the library. I
> know how to compile it by hand, but I want it to automatically be done.
>
> The line it tries looks:
> g++ -dynamiclib -o "../Test1Dir/bin/darwin/debug/libTEST1.dylib"
> <all the object files> -lTEST2 -g
>
> but it should look like this
>
> g++ -dynamiclib -o "../Test1Dir/bin/darwin/debug/libTEST1.dylib"
> <all the object files> "../Test2Dir/bin/darwin/debug/libTEST2.dylib" -g
>
> Secondly I want the library TEST2 to be compiled when I run bjam to
> compile TEST1.
>
> running bjam in the root directory doesn't work for me, I didn't work
> the problem out yet.
>
> Thanks for your help,
> Michi

It could be that your GLOB statement isn't finding anything. If that's
the case, I think it would treat test2 as a system library. Try adding
"ECHO $(SOURCES) ;" to your Test2Dir Jamfile to make sure it's actually
trying to build something. I'd also suggest making sure test2 is
building before you try to build what it relies on. :-)

Phillip


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