error C2733 second C linkage of overloaded function InterlockedIncrement not allowed
Hello, I'm a newbie in using boost. First : For programming I'm using Visual Studio 2008 with SP1 (german edition) and the target platform is Windows CE 6.0 with PXA270 (XScale, ARMVI) processor. And i'm using the STL delivered with Visual Studio. If i include shared_ptr.hpp i get at compiling the errors : "error C2733 second C linkage of overloaded function 'InterlockedIncrement' not allowed." "error C2733 second C linkage of overloaded function 'InterlockedDecrement' not allowed." "error C2733 second C linkage of overloaded function 'InterlockedCompareExchange not allowed." "error C2733 second C linkage of overloaded function 'InterlockedExchange' not allowed." "error C2733 second C linkage of overloaded function 'InterlockedExchangeAdd' not allowed." All errors are targeting to the file interlocked.hpp line 55-63. So my question is, what can i do to solve this problem ? Regards, Marcus Gehr
menuthaur:
Hello,
I'm a newbie in using boost.
First : For programming I'm using Visual Studio 2008 with SP1 (german edition) and the target platform is Windows CE 6.0 with PXA270 (XScale, ARMVI) processor. And i'm using the STL delivered with Visual Studio.
If i include shared_ptr.hpp i get at compiling the errors : "error C2733 second C linkage of overloaded function 'InterlockedIncrement' not allowed." "error C2733 second C linkage of overloaded function 'InterlockedDecrement' not allowed." "error C2733 second C linkage of overloaded function 'InterlockedCompareExchange not allowed." "error C2733 second C linkage of overloaded function 'InterlockedExchange' not allowed." "error C2733 second C linkage of overloaded function 'InterlockedExchangeAdd' not allowed."
All errors are targeting to the file interlocked.hpp line 55-63.
What version of Boost are you using?
So my question is, what can i do to solve this problem ?
You can try to #define BOOST_USE_WINDOWS_H, or maybe upgrade to 1.36.
Hello, Sorry i forgot. I'm using boost verison 1.36 I'll try, the define BOOST_USE_WINDOWS_H maybe i have luck. Thanks. Regards, Marcus Gehr -------- Original-Nachricht --------
Datum: Mon, 22 Sep 2008 17:00:33 +0300 Von: "Peter Dimov"
An: boost-users@lists.boost.org Betreff: Re: [Boost-users] error C2733 second C linkage of overloaded function InterlockedIncrement not allowed
menuthaur:
Hello,
I'm a newbie in using boost.
First : For programming I'm using Visual Studio 2008 with SP1 (german edition) and the target platform is Windows CE 6.0 with PXA270 (XScale, ARMVI) processor. And i'm using the STL delivered with Visual Studio.
If i include shared_ptr.hpp i get at compiling the errors : "error C2733 second C linkage of overloaded function 'InterlockedIncrement' not allowed." "error C2733 second C linkage of overloaded function 'InterlockedDecrement' not allowed." "error C2733 second C linkage of overloaded function 'InterlockedCompareExchange not allowed." "error C2733 second C linkage of overloaded function 'InterlockedExchange' not allowed." "error C2733 second C linkage of overloaded function 'InterlockedExchangeAdd' not allowed."
All errors are targeting to the file interlocked.hpp line 55-63.
What version of Boost are you using?
So my question is, what can i do to solve this problem ?
You can try to #define BOOST_USE_WINDOWS_H, or maybe upgrade to 1.36.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Marcus Gehr:
Hello,
Sorry i forgot. I'm using boost verison 1.36
You mentioned lines 55-63, these are (in 1.36): #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) extern "C" long __cdecl _InterlockedIncrement( long volatile * ); extern "C" long __cdecl _InterlockedDecrement( long volatile * ); extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); extern "C" long __cdecl _InterlockedExchange( long volatile *, long); extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long); But there is a CE-specific section before that: #elif defined(_WIN32_WCE) // under Windows CE we still have old-style Interlocked* functions extern "C" long __cdecl InterlockedIncrement( long* ); extern "C" long __cdecl InterlockedDecrement( long* ); extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); extern "C" long __cdecl InterlockedExchange( long*, long ); extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); Why does it not get selected in your configuration? Is _WIN32_WCE defined? It should be set to 600 for CE 6.0 (in principle). (Or is it 0x600?)
Hello, Thanks for your reply, i have to check first this part of source-code. Regards, Marcus Gehr -------- Original-Nachricht --------
Datum: Mon, 22 Sep 2008 18:06:02 +0300 Von: "Peter Dimov"
An: boost-users@lists.boost.org Betreff: Re: [Boost-users] error C2733 second C linkage of overloaded function InterlockedIncrement not allowed
Marcus Gehr:
Hello,
Sorry i forgot. I'm using boost verison 1.36
You mentioned lines 55-63, these are (in 1.36):
#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
extern "C" long __cdecl _InterlockedIncrement( long volatile * ); extern "C" long __cdecl _InterlockedDecrement( long volatile * ); extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); extern "C" long __cdecl _InterlockedExchange( long volatile *, long); extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long);
But there is a CE-specific section before that:
#elif defined(_WIN32_WCE)
// under Windows CE we still have old-style Interlocked* functions
extern "C" long __cdecl InterlockedIncrement( long* ); extern "C" long __cdecl InterlockedDecrement( long* ); extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); extern "C" long __cdecl InterlockedExchange( long*, long ); extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
Why does it not get selected in your configuration? Is _WIN32_WCE defined? It should be set to 600 for CE 6.0 (in principle). (Or is it 0x600?)
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hello, I was a little irritated about your response. So i had checked the file interlocked.hpp again. AND SORRY, i have given you the wrong line numbers. I mean line 38 to line 42: --------------------------------------------------------------------- #elif defined(_WIN32_WCE) // under Windows CE we still have old-style Interlocked* functions => extern "C" long __cdecl InterlockedIncrement( long* ); => extern "C" long __cdecl InterlockedDecrement( long* ); => extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); => extern "C" long __cdecl InterlockedExchange( long*, long ); => extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); # define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement ---------------------------------------------------------------------- These lines are making trouble at building the application. Regards, Marcus Gehr. -------- Original-Nachricht --------
Datum: Mon, 22 Sep 2008 18:06:02 +0300 Von: "Peter Dimov"
An: boost-users@lists.boost.org Betreff: Re: [Boost-users] error C2733 second C linkage of overloaded function InterlockedIncrement not allowed
Marcus Gehr:
Hello,
Sorry i forgot. I'm using boost verison 1.36
You mentioned lines 55-63, these are (in 1.36):
#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
extern "C" long __cdecl _InterlockedIncrement( long volatile * ); extern "C" long __cdecl _InterlockedDecrement( long volatile * ); extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); extern "C" long __cdecl _InterlockedExchange( long volatile *, long); extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long);
But there is a CE-specific section before that:
#elif defined(_WIN32_WCE)
// under Windows CE we still have old-style Interlocked* functions
extern "C" long __cdecl InterlockedIncrement( long* ); extern "C" long __cdecl InterlockedDecrement( long* ); extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); extern "C" long __cdecl InterlockedExchange( long*, long ); extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
Why does it not get selected in your configuration? Is _WIN32_WCE defined? It should be set to 600 for CE 6.0 (in principle). (Or is it 0x600?)
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
menuthaur
-
Peter Dimov