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
allocate_resources.cpp
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
'boost::equivalent'

    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
"bin\msvc\debug\threading-multi\allocate_resources.obj.rsp"

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

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

msvc.compile.c++ bin\msvc\debug\threading-multi\session.obj
session.cpp
src\session.cpp(1613) : error C2780:
'boost::_bi::bind_t<R,boost::_mfi::dm<R,T>,boost::_bi::list_av_1<R>::type>
boost::bind(R T::* ,A1)' : expects 2 arguments - 3 provided
        C:\boost_1_33_1\boost\bind.hpp(1616) : see declaration of
'boost::bind'
src\session.cpp(1613) : error C2780:
'boost::_bi::bind_t<R,boost::_mfi::cmf8<R,T,B1,B2,B3,B4,B5,B6,B7,B8>,boost::_bi::list_av_9<R,T,B1,B2,B3,B4,B5,B6,B7>::type>
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
....

3)

msvc.compile.c++ bin\msvc\debug\threading-multi\storage.obj
storage.cpp
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
"bin\msvc\debug\threading-multi\storage.obj.rsp"

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

4)

src\torrent.cpp(218) : error C2065: 'complete' : undeclared identifier
C:\boost_1_33_1\boost\tuple\detail\tuple_basic_no_partial_spec.hpp(471)
: 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
        with
        [
            T1=libtorrent::size_type,
            T2=libtorrent::size_type,
            T3=boost::tuples::null_type,
            T4=boost::tuples::null_type,
            T5=boost::tuples::null_type,
            T6=boost::tuples::null_type,
            T7=boost::tuples::null_type,
            T8=boost::tuples::null_type,
            T9=boost::tuples::null_type,
            T10=boost::tuples::null_type
        ]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net