Re: [Boost-users] Compiling Boost with 4 byte packing...

I finally got boost to build with visual studio 2008 and 4-byte packing.
Here is what I had to do:
1. Edit the tools\build\v2\user-config.jam and add:
using msvc : vc9 :
"D:/Program Files/Microsoft Visual Studio 9.0/VC/bin/cl.exe" :
<compileflags>-DBOOST_HAS_ABI_HEADERS
<compileflags>-DBOOST_PROTO_MAX_ARITY=10
<compileflags>-DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
<compileflags>-DBOOST_MPL_LIMIT_METAFUNCTION_ARITY=10
<compileflags>-DWIN32
<compileflags>-D_DEBUG
<compileflags>-D_LIB
<compileflags>-D_WIN32_WINNT=0x0501
<compileflags>-D_UNICODE
<compileflags>-DUNICODE
<compileflags>-DBOOST_ASIO_ENABLE_BUFFER_DEBUGGING
<compileflags>-Gm
<compileflags>-EHsc
<compileflags>-RTC1
<compileflags>-MTd
<compileflags>-Zp4
<compileflags>-W4
<compileflags>-c
<compileflags>-ZI
<compileflags>-TP
<linkflags>/MACHINE:X86
;
2. On the bjam command line use the options: --toolset=msvc-9.0
cxxflags=-Zp4
3. Edit boost/config/user.hpp:
// BOOST_ABI_PREFIX: A prefix header to include in place of whatever
// boost.config would normally select, any replacement should set up
// struct packing and alignment options as required.
#define BOOST_ABI_PREFIX
participants (1)
-
Brian Nantz