Compile fails under windows

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
jbailey8
Posts: 30
Joined: Sat Dec 26, 2009 3:29

Compile fails under windows

Post by jbailey8 » Fri Jan 29, 2010 1:07

I've been downloading/compiling the latest svn versions for awhile and there's never been any real
problem until now, with the current svn code I'm getting the following:


---------------------------------------------------------

Code: Select all


z:\program files\microsoft sdks\windows\v6.1\include\shtypes.h(437) : error C2146: syntax error : missing ';' before identifier 'SHCOLUMNID'
z:\program files\microsoft sdks\windows\v6.1\include\shtypes.h(437) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
z:\program files\microsoft sdks\windows\v6.1\include\shtypes.h(437) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
z:\program files\microsoft sdks\windows\v6.1\include\shtypes.h(439) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
z:\program files\microsoft sdks\windows\v6.1\include\shtypes.h(439) : error C2143: syntax error : missing ';' before '*'
z:\program files\microsoft sdks\windows\v6.1\include\shtypes.h(439) : error C2378: 'SHCOLUMNID' : redefinition; symbol cannot be overloaded with a typedef
        z:\program files\microsoft sdks\windows\v6.1\include\shtypes.h(437) : see declaration of 'SHCOLUMNID'
z:\program files\microsoft sdks\windows\v6.1\include\shtypes.h(439) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(438) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(564) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(800) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(1428) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(1700) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(1727) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(1732) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(1942) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(2546) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(2553) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(3298) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(3305) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(3374) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(3427) : error C2061: syntax error : identifier 'REFPROPVARIANT'
z:\program files\microsoft sdks\windows\v6.1\include\propsys.h(3592) : error C2061: syntax error : identifier 'REFPROPVARIANT'

I've tried updating various sdks' and trying different versions of the 2 include files mentioned, but I'm
still getting the same errors. This is on windows xp 64 visual studio 2005.
Any help would be greatly appreciated!

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Compile fails under windows

Post by Graf Zahl » Fri Jan 29, 2010 1:12

Apparently you are mixing headers from different SDKs. Make sure that 6.1 is at the top of the include list.

jbailey8
Posts: 30
Joined: Sat Dec 26, 2009 3:29

Re: Compile fails under windows

Post by jbailey8 » Fri Jan 29, 2010 3:44

I moved the 6.1 stuff to the top of the include list and that fixed that particular problem, but now I'm
getting this error:

Code: Select all


C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\intrin.h(912) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\intrin.h(912) : see declaration of '_interlockedbittestandset'
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\intrin.h(913) : error C2733: second C linkage of overloaded function '_interlockedbittestandreset' not allowed
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\intrin.h(913) : see declaration of '_interlockedbittestandreset'
i_xinput.cpp

I also had to manually add a define in the include file 'xinput.h'


#define XUSER_MAX_COUNT 4

This may (or may not) be part of the problem I'm having now, What I can't figure out is why
all these errors showed up out of the blue, I've not changed anything for ages and it's been
working fine, then all of a sudden, this stuff starts up....

jbailey8
Posts: 30
Joined: Sat Dec 26, 2009 3:29

Re: Compile fails under windows

Post by jbailey8 » Fri Jan 29, 2010 3:49

Oops! I left out the source file these errors are coming from:

gl_clock.cpp

jbailey8
Posts: 30
Joined: Sat Dec 26, 2009 3:29

Re: Compile fails under windows

Post by jbailey8 » Fri Jan 29, 2010 4:43

I've looked through the 6.1 files, the gzdoom sources etc, and I can't find where it's getting the 2nd
interlockedbittestandset reference from.....

jbailey8
Posts: 30
Joined: Sat Dec 26, 2009 3:29

Re: Compile fails under windows

Post by jbailey8 » Fri Jan 29, 2010 4:48

If I comment out the 2 lines listed in intrin.h:

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


everything compiles, but I shouldn't have to comment stuff out of a include file, there's something
still wrong somewhere...

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Compile fails under windows

Post by Graf Zahl » Fri Jan 29, 2010 9:22

No, you shouldn't - but this looks like a problem with the headers. You are not the first one to experience it.

Gez
Developer
Developer
Posts: 1396
Joined: Mon Oct 22, 2007 16:47

Re: Compile fails under windows

Post by Gez » Fri Jan 29, 2010 10:01

A few results from a Google search on that issue:
https://connect.microsoft.com/VisualStu ... ation-unit
http://social.msdn.microsoft.com/Forums ... 171fe45daa
Microsoft itself tells to comment out the second line.
Jonathan Caves - MSFT wrote:Hi: this is a problem with the header files - there are two incompatible declarations of '_interlockedbittestandset' - this issue has been fixed since the Beta release.
As I work for Visual C++ I have access to much newer builds. I just tested it again against yesterday's build and I didn't see the error message - there was an issue with the header files we get from the Windows SDK team - but this issue has been fixed.
More cases of people finding no other solution than commenting out this stuff:
http://bytes.com/topic/net/answers/6562 ... k-intrin-h
http://forums.steampowered.com/forums/s ... p?t=681798
http://www.hydrogenaudio.org/forums/ind ... opic=50972
http://developer.valvesoftware.com/wiki ... der_VS2008

So while generally you shouldn't mess around with headers, in this one case, you should.

jbailey8
Posts: 30
Joined: Sat Dec 26, 2009 3:29

Re: Compile fails under windows

Post by jbailey8 » Fri Jan 29, 2010 14:10

Thanks for the info! I'm glad to know that at least I actually did the right thing....

Locked

Return to “Closed Bugs”