including boost/thread.hpp gives compile error under VS7 in utility\base_from_member.hpp
Using Visual Studio 2003 (VS7) and boost 1.34.1, I have simply declared the following code and I get the resulting errors: Code: #pragma once #include <deque> #include <boost/thread.hpp> using namespace std; <SNIP> Compiler output: cl /c /W3 /G6 /GF /Gy /nologo /DNDEBUG /DWIN32 /D_WIN32 /D_WIN32_WINNT=0x0500 /DWINVER=0x0500 /D_WIN32_IE=0x060 0 /D_AFXDLL /D_WTL_NO_CSTRING /D_WTL_NO_WTYPES /D_WTL_NO_UNION_CLASSES -D_X86_=1 /Ox /Z7 /I\src\r870\develop\work\pcd m\std\include /DNT /Dpcdm /DDBREL=870 /D_WIN32_DCOM -GX /DREGISTER_PROXY_DLL /GR /EHsc /MD /Fohtsserver.obj htsserver.cpp.cpp htsserver.cpp.cpp c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2143: syntax error : missing ',' before 'constant' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(78) : see reference to class template instantiation 'boost::base_from_member<MemberType,UniqueID>' being compiled c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2226: syntax error : unexpected type 'T0' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2143: syntax error : missing ',' before 'constant' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2226: syntax error : unexpected type 'T0' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2143: syntax error : missing ',' before 'constant' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2226: syntax error : unexpected type 'T0' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2143: syntax error : missing ',' before 'constant' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2226: syntax error : unexpected type 'T0' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2143: syntax error : missing ',' before 'constant' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(76) : error C2226: syntax error : unexpected type 'T0' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(78) : error C2143: syntax error : missing ';' before '}' c:\apps\boost_1_34_1\boost\utility\base_from_member.hpp(78) : error C2238: unexpected token(s) preceding ';' c:\apps\VS .NET 2003\Vc7\include\ostream(604) : fatal error C1903: unable to recover from previous error(s); stopping compilation NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. Note that I havent declared or used any of the threading or mutex objects yet. It is not possible to upgrade compiler version for this project. Regards, Jason
jason72@internode.on.net wrote:
Using Visual Studio 2003 (VS7) and boost 1.34.1, I have simply declared the following code and I get the resulting errors:
<SNIP>
It is not possible to upgrade compiler version for this project.
You didn't say whether you're using 7.0 or 7.1? In my experience, the 7.0 compiler fails with a large number of valid language constructs. For us, 7.0 was unusable, 7.1 worked.
participants (2)
-
jason72@internode.on.net
-
Nat Goodspeed