tags:

views:

894

answers:

2

How do I force a 32 bit build of boost with gcc? Currently attempting by putting this line in my user-config.jam, but it does not work.

using gcc : 4.1.2 : g++ : compileflags="-m32" ;

Chenz

+3  A: 

If you are using C++ Boost 1.40, use:

bjam address-model=32

If you are using eariler version, consider upgrading. If you cannot, use

bjam address-model=32 architecture=x86

I also recommend that you take a look at the fine manual

Vladimir Prus
Oh yeah... that "fine manual" is great. I love all the examples they provide. (Sarcasm)
Crazy Chenz
Patches are welcome. However, I am not exactly sure that explicitly adding a full command like example for every single property listed at the above URL will do much other than bloating the size of docs.
Vladimir Prus
A: 

This answer helped me toward a solution that worked for me. I was trying to compile a 32-bit version of boost_1_43_0 on 64-bit debian and eventually came up with this:

./bjam cflags=-m32 cxxflags=-m32 address-model=32 threading=multi architecture=x86 instruction-set=i686 stage

Andrew Meadows