[boost-users] Build boost libraries (e.g. filesystem) with gcc and -m32
Hi all, I'm working on Intel Core2 Duo machine running Linux and have the following problem: I want to compile 32-bit versions of the boost libs with gcc, so that I can link and create 32bit programs. Unfortunately if I use bjam --toolset=gcc stage the libraries are built as 64bit libraries so if I link I get the following error:
g++ filesystem_test.cpp -g -m32 -c -o filesystem_test.o -L../boost/boost_1_35_0/stage/lib -I../boost/boost_1_35_0 g++ filesystem_test.o -L../boost/boost_1_35_0/stage/lib -m32 -o filesystem_test -lboost_filesystem-gcc41-mt /usr/bin/ld: skipping incompatible .../boost/boost_1_35_0/stage/lib/libboost_filesystem-gcc41-mt.so when searching for -lboost_filesystem-gcc41-mt
If I omit -m32 everything works fine. Help is very much appreciated, Andreas
Andreas Profous wrote:
Hi all,
I'm working on Intel Core2 Duo machine running Linux and have the following problem:
I want to compile 32-bit versions of the boost libs with gcc, so that I can link and create 32bit programs. Unfortunately if I use bjam --toolset=gcc stage
the libraries are built as 64bit libraries so if I link I get the following error:
g++ filesystem_test.cpp -g -m32 -c -o filesystem_test.o -L../boost/boost_1_35_0/stage/lib -I../boost/boost_1_35_0 g++ filesystem_test.o -L../boost/boost_1_35_0/stage/lib -m32 -o filesystem_test -lboost_filesystem-gcc41-mt /usr/bin/ld: skipping incompatible .../boost/boost_1_35_0/stage/lib/libboost_filesystem-gcc41-mt.so when searching for -lboost_filesystem-gcc41-mt
If I omit -m32 everything works fine. Help is very much appreciated,
Add architecture=x86 address-model=32 to bjam command line. - Volodya
participants (2)
-
Andreas Profous
-
Vladimir Prus