Boost logo

Boost Users :

From: Allen Zhao (xlz_at_[hidden])
Date: 2006-01-03 23:56:20

Hi, All,

I am having troubles to compile libtorrent 0.9.1 which depends on boost
1.33+. From the error messages, boost does not work very well with
Visual Studio 2002.

What puzzles me more is that if I just build the boost alone by invoking
bjam in the boost directory, I still can not build the whole library
because of the spirit section; but all the errors as reported below does
not appear. This seems to indicate some compiler options issues.

Is there any successful story that you can share with me with regards to
VC 7.0 compilation? Any pointers are welcome. The errors I have seem so
far at enclosed at the end. The libtorrent only depends on
boost:filesystem, boost:date_time and boost::thread.

Best regards,

Allen Zhao

Following are some of the messages related to boost:

1) <boost\filesystem\operations.hpp>'s BOOST_OPERATOR_TEMPLATE definition:

msvc.compile.c++ bin\msvc\debug\threading-multi\allocate_resources.obj
C:\boost_1_33_1\boost\filesystem\operations.hpp(56) : error C2955:
'boost::equivalent' : use of class template requires template argument list
        C:\boost_1_33_1\boost\operators.hpp(820) : see declaration of

    call "C:\Program Files\Microsoft Visual Studio
.NET\Vc7\bin\vcvars32.bat" > nul
cl /Zm800 -nologo -TP /Z7 /Od /Ob0 /GR /MDd /wd4675 /EHs
/Zc:forScope /Zc:wchar_t
@"bin\msvc\debug\threading-multi\allocate_resources.obj.rsp" -c
-Fo"bin\msvc\debug\threading-multi\allocate_resources.obj" && del /f

...failed msvc.compile.c++

2) boost::bind(std::less<int>(), _1, 0)) (libtorrent/src/session.cpp)

msvc.compile.c++ bin\msvc\debug\threading-multi\session.obj
src\session.cpp(1613) : error C2780:
boost::bind(R T::* ,A1)' : expects 2 arguments - 3 provided
        C:\boost_1_33_1\boost\bind.hpp(1616) : see declaration of
src\session.cpp(1613) : error C2780:
boost::bind(R (__thiscall T::* )(B1,B2,B3,B4,B5,B6,B7,B8)
const,A1,A2,A3,A4,A5,A6,A7,A8,A9)' : expects 10 arguments - 3 provided


msvc.compile.c++ bin\msvc\debug\threading-multi\storage.obj
C:\boost_1_33_1\boost\lambda\detail\arity_code.hpp(61) : error C2065:
'T' : undeclared identifier
C:\boost_1_33_1\boost\lambda\detail\arity_code.hpp(61) : error C2687:
cannot define a nested UDT of a template class out of line
C:\boost_1_33_1\boost\lambda\detail\arity_code.hpp(61) : fatal error
C1903: unable to recover from previous error(s); stopping compilation

    call "C:\Program Files\Microsoft Visual Studio
.NET\Vc7\bin\vcvars32.bat" > nul
cl /Zm800 -nologo -TP /Z7 /Od /Ob0 /GR /MDd /wd4675 /EHs
/Zc:forScope /Zc:wchar_t
@"bin\msvc\debug\threading-multi\storage.obj.rsp" -c
-Fo"bin\msvc\debug\threading-multi\storage.obj" && del /f

...failed msvc.compile.c++ bin\msvc\debug\threading-multi\storage.obj...


src\torrent.cpp(218) : error C2065: 'complete' : undeclared identifier
: error C2039: 'map_tuple_to_cons' : is not a member of 'boost::detail'
        src\torrent.cpp(476) : see reference to class template
instantiation 'boost::tuple<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>' being compiled

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at