I’m moving a large software package from Visual C++ 2003 to Visual C++ 2008. It depends on 3 years old versions of a lot of third party packages: ICE 3.0.1, ACE 5.4.3, Boost 1.33.1, Qt 4.1, etc.
Those libraries have underwent so many changes that updating the whole software to Visual C++ 2008 and the newest versions of the 3rd party libraries would be a too difficult task to be accomplished in a reasonable amount of time, therefore I’ve decided I’m going to stick to old libraries as much as possible, while moving to Visual C++ 9.0. The next step would be to move to newer versions of the 3rd party libraries or even to remove most of those dependencies and make the software depend only on Qt.
For starters, stock Boost 1.33.1 did not build with VC++ 9.0 but after some digging and tweaking, it works. Here is how:
- Download Boost 1.33.1 and uncompress it. It does not support VC++ 9.0.
- Apply patch to support VC++ 9.0
- Open cmd.exe and run %PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat
- boost_1_33_1\tools\build\jam_src and run build.bat
- Go to directory boost_1_33_1 and run tools\build\jam_src\bin.nt\x86\bjam.exe -sTOOLS=vc-9_0
- Run tools\build\jam_src\bin.nt\x86\bjam.exe -sTOOLS=vc-9_0 install to install to c:\boost
I followed the above steps :
tools\build\jam_src\bin.ntx86\bjam -sTOOLS=vc-9_0 install (step 6)
vc-9_0-tools.jam: No such file or directory
check boost_1_33_1\tools\build\v1 I found the following vc*-tools.jam :
Did you apply the patch I provided? It creates vc-9_0-tools.jam
How do I apply the patch?
patch -p < /path/to/patch Check this: http://en.wikipedia.org/wiki/Patch_(Unix)
In case you like GUIs better:
Oops! It works well under my XP mode of Windows 7 64 bit.
Thanks a lot!
How to apply the patch?
I’m getting following error when attempting to apply boost-1.33.1-vc90-support.patch file using the “patch” utility downloaded from http://gnuwin32.sourceforge.net/packages/patch.htm
C:\libs>C:\patch.exe -p0 dir
Directory of C:\libs
11/04/2011 01:44 PM .
11/04/2011 01:44 PM ..
11/04/2011 10:04 AM ACE_wrappers
11/04/2011 01:42 PM 15,249 boost-1.33.1-vc90-support.patch
11/04/2011 04:41 PM boost_1_33_1
Any idea on what could be the reason for this failure? (Do I need to use a different patch tool?)
Oops the error message got truncated in my earlier post. Please find it below:
can't find file to patch at input line 4
Perhaps you used the wrong -p or –strip option?
The text leading up to this was:
|diff -rupNd e:\boost_1_33_1.orig/boost/config/auto_link.hpp e:\boost_1_33_1/boo
|— e:\boost_1_33_1.orig/boost/config/auto_link.hpp 2005-08-16 12:30:58.0000
|+++ e:\boost_1_33_1/boost/config/auto_link.hpp 2008-04-21 19:20:31.421875000 +0
File to patch: EOF
What’s the name of the Boost 1.33.1 source directory?
It should be boost_1_33_1
If it’s different (say, “boost-1.33.1”), then do:
patch -p1 -d boost-1.33.1 < boost-1.33.1-vc90-support.patch If 'patch' from gnuwin32 segfaults, then you will need to convert line endings (dos2unix).
Thanks for the quick response. patch with “p1 (patch -p1 < xxxx.patch) " option worked well (earlier i tried with p0 level). I'm able to compile boost 1.33.1 using Visual C++ 2008 compile. Thank you once again.
When I apply patch to support VC++9.0, I got the following message.
C:DevelopmentsAreaAutoMod_DevelopmentsLibraryBoost>patch.exe -p1 < boost-1.33.1-vc90-support.patch
patching file boost_1_33_1/boost/config/auto_link.hpp
patching file boost_1_33_1/boost/config/compiler/visualc.hpp
patching file boost_1_33_1/boost/signals/detail/named_slot_map.hpp
patching file boost_1_33_1/libs/signals/src/named_slot_map.cpp
patching file boost_1_33_1/tools/build/v1/vc-9_0-tools.html
patch.exe: **** malformed patch at line 65:
Is it done correctly?
May be not. Because the vc-9_0-tools.jam file is not found.
And could you let me know how to generate the jam file for VC++9.0 64bit?