[Compiler Error] C2733 building GZDoom

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
MartinHowe
Posts: 154
Joined: Tue Aug 30, 2005 22:07
Location: East Suffolk (UK)

[Compiler Error] C2733 building GZDoom

Post by MartinHowe »

When building GZDoom 1.0.29 I get 12 errors from MSVC stating thus:

Code: Select all

2>C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(944) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed
2>        C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(944) : see declaration of '_interlockedbittestandset'
2>C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(945) : error C2733: second C linkage of overloaded function '_interlockedbittestandreset' not allowed
2>        C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(945) : see declaration of '_interlockedbittestandreset'
2>win32gliface.cpp
2>C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(944) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed
2>        C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(944) : see declaration of '_interlockedbittestandset'
2>C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(945) : error C2733: second C linkage of overloaded function '_interlockedbittestandreset' not allowed
2>        C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(945) : see declaration of '_interlockedbittestandreset'
2>fb_ddraw.cpp
2>C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(944) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed
2>        C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(944) : see declaration of '_interlockedbittestandset'
2>C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(945) : error C2733: second C linkage of overloaded function '_interlockedbittestandreset' not allowed
2>        C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(945) : see declaration of '_interlockedbittestandreset'
2>fb_d3d9.cpp
2>C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(944) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed
2>        C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(944) : see declaration of '_interlockedbittestandset'
2>C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(945) : error C2733: second C linkage of overloaded function '_interlockedbittestandreset' not allowed
2>        C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h(945) : see declaration of '_interlockedbittestandreset'
If anybody else has had this problem and resolved it, please tell me how.

Not sure if this is truly a bug in the GZDoom build setup or just MSFT being stupid again... :?
User avatar
MartinHowe
Posts: 154
Joined: Tue Aug 30, 2005 22:07
Location: East Suffolk (UK)

Re: [Compiler Error] C2733 building GZDoom

Post by MartinHowe »

MartinHowe wrote:or just MSFT being stupid again... :?
Did I really need to ask :) Apparently it is a bug in the include files and the best answer from MSFT is that it will be fixed in the next update of the SDK. Great :(

A workaround that I have found is to comment out the lines 944 and 945 of intrin.h in the visual studio include files:

//__MACHINEI(unsigned char _interlockedbittestandset(long *a, long b))
//__MACHINEI(unsigned char _interlockedbittestandreset(long *a, long b))

However, this is for the latest VC8 express and with the Windows SDK on Vista - people with other versions of the SDK or on XP may not be experiencing this, so YYMV. Obviously, messing with MSFT include files is not recommended, so do this ONLY if you are experiencing the problem!
Locked

Return to “Closed Bugs”