Boost logo

Boost-Build :

From: Brecht Machiels (brecht.machiels_at_[hidden])
Date: 2006-10-05 08:50:38


Hello all,

I've been looking for a build system for a hobby project I'm doing in
C++. I'd like it to be able to build for different targets, starting
with MinGW32, MSVC and Linux GCC. Boost.Build and SCons seemed like the
best options to me. I decided on BBuild V2 as SCons' Python requirement
makes it a bit less practical. I see MinGW32 is not officially supported
by BBuild. I've been able to build the example "hello" project without
problems though.

I've been browsing the Boost.Build documentation and I am trying to
build a simple wxWidgets project. I'm first trying to build with
MinGW32, ignoring other targets for now.

Unfortunately, I cannot get it to build. The problem I have is with
linking the wxWidgets libraries. With a makefile it's easy. I simply
have to use "wx-config --libs". I have tried doing the same with bjam
but haven't gotten it to work. Is there a way to use wx-config with
bjam? (Perhaps it's even not good practice to be using *-config scripts
with bjam?).

So I gave up on wx-config and tried to manually copy it's output to a
Jamfile. In my case, wx-config --libs produces:
-L/usr/local/lib -mthreads -Wl,--subsystem,windows -mwindows
/usr/local/lib/libwx_mswd-2.6.a -lwxregexd-2.6 -lwxexpatd-2.6
-lwxtiffd-2.6 -lwxjpegd-2.6 -lwxpngd-2.6 -lwxzlibd-2.6 -lrpcrt4
-loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32
-lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32

I find the Boost.Build V2 documentation to be confusing. I find it very
hard to locate what I am looking for. I've now finally stumbled upon
http://www.boost.org/doc/html/bbv2/tutorial/prebuilt.html
It seems like a lot of work to add the whole list of libs in that way.
Anyway, I still don't know how to specify the location of my libs
(/usr/local/lib). Or am I forced to give <file> the full path each time?

Also, I'm not sure what to do with "-mthreads",
"-Wl,--subsystem,windows" and "-mwindows". What it comes down to, I
guess, is that I don't see the big picture. How should I set up a
Jamfile for several targets? Also, how can I make it independent of my
setup so that other people can also build my project with a minimal effort?

The reason I'm trying to use bjam is because it was supposed to simplify
the build process. In the meantime, I've now spent hours on trying to
build this simple project. That can't be good :)

Like I said, I find the Boost.Build V2 documentation to be confusing. I
can't quite say what is the cause of it. I suspect it has to do with the
way it is divided in sections.

What I'd personally find very helpful would be the discussion of an
example Jamfile for a small project that must be linked with prebuilt
libraries and support several targets. I think that's a pretty common
problem. Is something like that available?

Also, is it possible to have bjam leave my MSYS paths intact when
passing it to gcc (/usr/local/lib for example)? It seems to insist on
this format: "C:/nospace/msys/local/lib".

Thanks,
Brecht


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