|
Boost-Build : |
Subject: [Boost-build] Compiling Boost for 32Bit on 64Bit system
From: Stefan Weber (stefan.weber_at_[hidden])
Date: 2008-09-26 10:08:09
Hi,
I'm heavily struggling to build Boost in 32Bit mode in a 64Bit environment
(both, OS and CPU). The code that depends on the Boost libraries needs to be
built with -m32 option for g++, therefore I also need to build Boost in
32Bit mode, right? Anyways, googling showed me that the following could make
sense:
./tools/jam/stage/bin.linuxx86_64/bjam --toolset=gcc --with-system
--with-thread --address-model=32 -d+2 --cxxflags=-m32 --linkflags=-m32
stage
I use -d+2 to see how the compiler is called, but unfortunately the -m32
flag is not passed. Then I want to build the executable:
g++ -m32 -L../downloads/boost_1_35_0/stage/lib -lboost_system-gcc41-mt
-I../downloads/boost_1_35_0/stage/include/boost-1_35 thread_test.cxx
the linker tells me that it will skip the system library because it is
incompatible. By the way, thread_test.cxx is very minimal:
#include "boost/thread.hpp"
int main() {
boost::mutex myMutex;
}
Any ideas what I am missing here?
Thanks,
Stefan
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