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" ;
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" ;
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
gcc
, you should take a look at @AndrewMeadows answer. –
Caoutchouc architecture=x86
. –
Dioscuri This answer helped me toward a solution that worked for me. I was trying to compile a 32-bits version of boost_1_43_0
on 64-bits debian and eventually came up with this:
./bjam \
cflags=-m32 \
cxxflags=-m32 \
address-model=32 \
threading=multi \
architecture=x86 \
instruction-set=i686 \
stage
using gcc : : g++-4.4 ;
is used (specified 4.4 for compiling Boost with Matlab MEX (32-bit) files on 64-bit linux). –
Hound © 2022 - 2024 — McMap. All rights reserved.
setarch i686 make
or similar. I don't know if that'd work for Boost, particularly, though. (And, in that case, you could just download the 32-bit binary for your OS, so I'm guessing perhaps you're on another system.) – Worsted