
On Mon, Sep 13, 2010 at 9:54 PM, Bibbo, Joe
I have downloaded the boost v1.44 and would like to see if our usage of the FileSystem library is compatible with Version 3 of library. I am having trouble building the library.
Using the command
bjam toolset=msvc-9.0 variant=debug threading=multi link=static define=_BIND_TO_CURRENT_VCLIBS_VERSION define=BOOST_FILESYSTEM_VERSION=3 --with-filesystem
I am seeing following error message
" .. compile-c-c++ bin.v2\libs\system\build\msvc-9.0\debug\link-static\threading-multi\error_code.obj error_code.cpp msvc.archive bin.v2\libs\system\build\msvc-9.0\debug\link-static\threading-multi\libboost_system-vc90-mt-gd-1_44.lib common.copy stage\lib\libboost_system-vc90-mt-gd-1_44.lib bin.v2\libs\system\build\msvc-9.0\debug\link-static\threading-multi\libboost_system-vc90-mt-gd-1_44.lib 1 file(s) copied. compile-c-c++ bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_operations.obj v2_operations.cpp S:\sony4\boost\boost_1_44_0\boost/filesystem/v2/config.hpp(16) : fatal error C1189: #error : Compiling Filesystem version 2 file with BOOST_FILESYSTEM_VERSION defined != 2 call "G:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
nul cl /Zm800 -nologo @"bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_operations.obj.rsp" ...failed compile-c-c++ bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_operations.obj... compile-c-c++ bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_path.obj v2_path.cpp S:\sony4\boost\boost_1_44_0\boost/filesystem/v2/config.hpp(16) : fatal error C1189: #error : Compiling Filesystem version 2 file with BOOST_FILESYSTEM_VERSION defined != 2 call "G:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 nul cl /Zm800 -nologo @"bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_path.obj.rsp" ...failed compile-c-c++ bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_path.obj... compile-c-c++ bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_portability.obj v2_portability.cpp S:\sony4\boost\boost_1_44_0\boost/filesystem/v2/config.hpp(16) : fatal error C1189: #error : Compiling Filesystem version 2 file with BOOST_FILESYSTEM_VERSION defined != 2 call "G:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 nul cl /Zm800 -nologo @"bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_portability.obj.rsp" ... "
Is there something else I need to configure to build this version of the library?
It is my understanding that you don't need to specify BOOST_FILESYSTEM_VERSION when building Boost 1.44. This macro is to be placed in the preprocessor settings of a program that uses Boost 1.44. I upgraded to Boost 1.44 yesterday and was confused with this. I read the following text from the source file boost_1_44_0\libs\filesystem\v3\src\path.cpp which cleared up my confusion: // During the transition to V3, libraries are compiled with both V2 and V3 sources. // On old compilers that don't support V3 anyhow, we just skip everything so the compile // will succeed and the library can be built. Regards, Pete