How do I force a 32-bit build of Boost with GCC?

Crazy Chenz picture Crazy Chenz · Aug 31, 2009 · Viewed 22.7k times · Source

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" ;

Answer

Vladimir Prus picture Vladimir Prus · Sep 6, 2009

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