HOWTO: Building Boost for Windows 64-bit
Hi, I just ran across an excellent blog post showing how to build Boost for Windows 64-bit: http://einaros.blogspot.com/2007/06/compiling-boost-for-x64.html I had two questions: 1) Can the Boost team please add this to the official documentation? 2) Will the next public release include 64-bit binaries? Thank you, Gili -- View this message in context: http://www.nabble.com/HOWTO%3A-Building-Boost-for-Windows-64-bit-tp18973954p... Sent from the Boost - Users mailing list archive at Nabble.com.
cowwoc
Hi,
I just ran across an excellent blog post showing how to build Boost for Windows 64-bit: http://einaros.blogspot.com/2007/06/compiling-boost-for-x64.html
I had two questions:
1) Can the Boost team please add this to the official documentation? 2) Will the next public release include 64-bit binaries?
Thank you, Gili
c:\boost_build_result_debug_32.txt del c:\boost_1_36_0\bin.v2 /s /q 6)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=arch:SSE2 link=shared debug address-model=64 threading=multi --
c:\boost_build_result_debug_64.txt del c:\boost_1_36_0\bin.v2 /s /q 7)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=GL define=arch:SSE2 link=shared release address-model=32
c:\boost_build_result_release_32.txt del c:\boost_1_36_0\bin.v2 /s /q 8)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=GL define=arch:SSE2 link=shared release address-model=64
I use this procedure to build x84 & x64: 1)Open up Visual Studio 2008 x64 cross tools command prompt (% comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0 \VC\vcvarsall.bat"" x86_amd64) 2)cd boost_1_36_0 \tools\jam\src 3)build.bat 4)cd boost_1_36_0 del c:\boost_1_36_0\bin.v2 /s /q 5)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=arch:SSE2 link=shared debug address-model=32 threading=multi -- prefix=c:/boost32 --without-python --without-mpi install prefix=c:/boost64 --without-python --without-mpi install threading=multi --prefix=c:/boost32 --without-python --without-mpi install threading=multi --prefix=c:/boost64 --without-python --without-mpi install
c:\boost_build_result_release_64.txt del c:\boost_1_36_0\bin.v2 /s /q
I don't think define=arch:SSE2 has the effect you think it does; rather, I believe what you want is cxxflags="-arch:SSE2". Also note that -arch has no effect on 64-bit compilations, so it can be ommitted from the address-model=64 bjam invocations.
Adam Merz
I don't think define=arch:SSE2 has the effect you think it does; rather, I believe what you want is cxxflags="-arch:SSE2". Also note that -arch has no effect on 64-bit compilations, so it can be ommitted from the address-
model=64
bjam invocations.
f:\boost_build_result_debug_32.txt 6.1)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=arch:SSE2 link=shared debug address-model=64 threading=multi --
f:\boost_build_result_debug_64.txt 7.1)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=GL define=arch:SSE2 link=shared release address-model=32
f:\boost_build_result_release_32.txt 8.1)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=GL define=arch:SSE2 link=shared release address-model=64
I thought "define" was more generic and applicable for both of C and C++ code (cflags and cxxflags). It would be nice to have a cookbook for buliding boost for different scenarios (Linux/Windows-x86/x64-thraeding-runtime...), specially for optimization. 1)Open up a command prompt 2)cd boost_1_36_0 \tools\jam\src 3)build.bat 4)cd boost_1_36_0 5.1)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=arch:SSE2 link=shared debug address-model=32 threading=multi -- prefix=c:/boost32 --without-python --without-mpi clean 5.2)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=arch:SSE2 link=shared debug address-model=32 threading=multi -- prefix=c:/boost32 --without-python --without-mpi install prefix=c:/boost64 --without-python --without-mpi clean 6.2)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=arch:SSE2 link=shared debug address-model=64 threading=multi -- prefix=c:/boost64 --without-python --without-mpi install threading=multi --prefix=c:/boost32 --without-python --without-mpi clean 7.2)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=GL define=arch:SSE2 link=shared release address-model=32 threading=multi --prefix=c:/boost32 --without-python --without-mpi install threading=multi --prefix=c:/boost64 --without-python --without-mpi clean 8.2)tools\jam\src\bin.ntx86_64\bjam.exe toolset=msvc-9.0 define=_SECURE_SCL=0 define=GL define=arch:SSE2 link=shared release address-model=64 threading=multi --prefix=c:/boost64 --without-python --without-mpi install
f:\boost_build_result_release_64.txt
Bijan
Adam Merz
writes: I don't think define=arch:SSE2 has the effect you think it does; rather, I believe what you want is cxxflags="-arch:SSE2". Also note that -arch has no effect on 64-bit compilations, so it can be ommitted from the address- model=64 bjam invocations.
I thought "define" was more generic and applicable for both of C and C++ code (cflags and cxxflags).
According to http://tinyurl.com/6zeyhu, cflags affects both the C and C++ compilers, while cxxflags affects only the C++ compiler; I use cxxflags as a matter of habit, but in the case of -arch, I suppose cflags would be more appropriate (although I'm not aware of any C code inside of Boost anyway). define creates macro definitions (i.e., /D for MSVC; http://tinyurl.com/6aku5f), and so is suitable for defining _SECURE_SCL, but not for specifying -arch to the compiler.
on Thu Aug 14 2008, cowwoc
Hi,
I just ran across an excellent blog post showing how to build Boost for Windows 64-bit: http://einaros.blogspot.com/2007/06/compiling-boost-for-x64.html
I had two questions:
1) Can the Boost team please add this to the official documentation?
Where, specifically, do you think it should appear? Could you please put that information in a ticket at http://svn.boost.org? Thanks, -- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (4)
-
Adam Merz
-
Bijan
-
cowwoc
-
David Abrahams