[intrusive,thread] Problems with VS in 64-bit mode
I'm trying to use thread and intrusive libraries with VS 2008 (9.0.21022.8) In 32-bit mode (Win32 platform) everything works just fine. However, when I switch the configuration to x64, two problems appear: Intrusive problem: ================== With default settings, just including <boost/intrusive/list.hpp> produces the follwing error: C:\Users\zvrba\Work\boost_1_37_0\boost/intrusive/detail/mpl.hpp(191) : error C2953: 'boost::intrusive::detail::is_unary_or_binary_function_impl <R(__cdecl *)(T0)>' : class template has already been defined I have traced that back to the BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS define, which is active when compiling with MS extensions turned on. Thread problem: =============== I turned off MS extensions, and this fixes the problem with the intrusive library (the header is included before the thread header). However, then I get the following error: C:\Users\zvrba\Work\boost_1_37_0\boost/config/requires_threads.hpp(29) : fatal error C1189: #error : "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" This error is dependent on the language extensions being enabled or not. Fix: ==== I have temporarily solved the problem by hacking the list.hpp header: #if defined(_MSC_EXTENSIONS) && !defined(__BORLAND__) //#define BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS #endif (the commented line is the fix). The cause is probably the following comment in the documentation: "On Itanium Processor Family (IPF) and x64 processors, __cdecl is accepted and ignored by the compiler" (same for __stdcall) This makes the decorated and undecorated signatures equivalent, so I tend to believe that this fix would be correct with the additional [&& !defined(_WIN64)] clause.
Zeljko Vrba wrote:
I'm trying to use thread and intrusive libraries with VS 2008 (9.0.21022.8) In 32-bit mode (Win32 platform) everything works just fine. However, when I switch the configuration to x64, two problems appear:
This has been reported. Please try latest SVN code to see if the problem has disappeared. Regards Ion
On Sun, Dec 28, 2008 at 01:03:43PM +0100, Ion Gaztañaga wrote:
Zeljko Vrba wrote:
I'm trying to use thread and intrusive libraries with VS 2008 (9.0.21022.8) In 32-bit mode (Win32 platform) everything works just fine. However, when I switch the configuration to x64, two problems appear:
This has been reported. Please try latest SVN code to see if the problem has disappeared.
Does the SVN version also fix the issue with boost.thread and disabled language extensions?
participants (2)
-
Ion Gaztañaga
-
Zeljko Vrba