I'm trying to get boost 1.53 to link to an app that is compiled for i386. This is on a mac that is 64 bit. It seems that boost is getting built by default as 64 bit so when I try to link to it, I get this error:
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/local/lib/libboost_system.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
I tried building boost via this command:
./b2 toolset=darwin cxxflags="-arch i386" address-model=32 stage
But it doesn't seem to make a difference. My linker settings are
-lboost_system -lboost_thread
Do I need to build boost a different way, or link to it differently?
Edit
Just figured out that this command seems to build it correctly:
./b2 toolset=darwin cxxflags="-arch i386" address-model=32 architecture=x86 stage
and do the same for install
./b2 install toolset=darwin cxxflags="-arch i386" address-model=32 architecture=x86 stage