Advertisement

Sorry, but yes its a compiler error question...

Started by January 27, 2002 11:05 PM
0 comments, last by Codejoy 23 years, 1 month ago
So I have downloaded NeHe''s lesson 7 and tried to compile, got the following errors, it seems i have the wrong direct X version but I just downloaded the 8.1 SDK and installed it and pointed my IDE in VC++ to point to the right lib paths and include paths and this is the following error i got: DirectInput.cpp c:\DX8SDK\INCLUDE\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800 c:\DX8SDK\INCLUDE\dinput.h(646) : error C2501: ''UINT_PTR'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(646) : error C2146: syntax error : missing '';'' before identifier ''uAppData'' c:\DX8SDK\INCLUDE\dinput.h(646) : error C2501: ''uAppData'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(658) : error C2501: ''UINT_PTR'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(658) : error C2146: syntax error : missing '';'' before identifier ''uAppData'' c:\DX8SDK\INCLUDE\dinput.h(658) : error C2501: ''uAppData'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(1056) : error C2501: ''UINT_PTR'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(1056) : error C2146: syntax error : missing '';'' before identifier ''uData'' c:\DX8SDK\INCLUDE\dinput.h(1056) : error C2501: ''uData'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(1209) : error C2501: ''UINT_PTR'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(1209) : error C2146: syntax error : missing '';'' before identifier ''uAppData'' c:\DX8SDK\INCLUDE\dinput.h(1209) : error C2501: ''uAppData'' : missing decl-specifiers Game.cpp c:\DX8SDK\INCLUDE\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800 c:\DX8SDK\INCLUDE\dinput.h(646) : error C2501: ''UINT_PTR'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(646) : error C2146: syntax error : missing '';'' before identifier ''uAppData'' c:\DX8SDK\INCLUDE\dinput.h(646) : error C2501: ''uAppData'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(658) : error C2501: ''UINT_PTR'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(658) : error C2146: syntax error : missing '';'' before identifier ''uAppData'' c:\DX8SDK\INCLUDE\dinput.h(658) : error C2501: ''uAppData'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(1056) : error C2501: ''UINT_PTR'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(1056) : error C2146: syntax error : missing '';'' before identifier ''uData'' c:\DX8SDK\INCLUDE\dinput.h(1056) : error C2501: ''uData'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(1209) : error C2501: ''UINT_PTR'' : missing decl-specifiers c:\DX8SDK\INCLUDE\dinput.h(1209) : error C2146: syntax error : missing '';'' before identifier ''uAppData'' c:\DX8SDK\INCLUDE\dinput.h(1209) : error C2501: ''uAppData'' : missing decl-specifiers Loaders.cpp to me i shouldn''t be getting these errors, I am trying to compile in VC++ 5.0 do I need 6.0 for this tutorial? (I also get the same errors in trying to compile the Open GL game programming books chapter 21 game demo at the end of the book) I hate to ask this stupid compiler question, I thought everything is right but guess not, anyone see what I am doing wrong? thanks -Shane
unfortunatly i have very few ideas why this may be happening.

its possible dx uses special features of c++ that were not implemented in vc5,0.

you could try just adding a
  #define UINT_PTR unisgned __int32 *  


to all your files that include the dx stuff, make sure its above the dx includes. though this assumes that these are the only compile errors (possible in newer versions of the headers included with visual c++, UINT_PTR is defined). though a hack, it should be fine.

This topic is closed to new replies.

Advertisement