Skip to main content
GameDev.net gamedev.net
🔒 Locked

Bogus headers problem

Started by Afr0m@n Dec 14, 2005 at 11:10 AM 13 replies 2.6k views
Original Post
Afr0m@n
Afr0m@n
Er... ok, so I installed the latest platform SDK version from Microsoft, because I was told that I'd need it to include "windows.h" in my program in VS 2005 Express. I thought it would help - but no! It quadrippled my problems. It seems to have installed bogus versions of several header files in some remote location on my system where every C/C++ installer seems to copy said headers from! I uninstalled VS6 last night, and then reinstalled again and installed Service Pack 4. That didn't work. Ok, so I tried VS2005 again just to be sure. Nah, 18 errors that weren't there before the platform SDK (also uninstalled platform SDK last night before I did reinstallation of VS6 + SP). So today when I came home from school, I tried to uninstall VS2005, delete all it's folders and then install VS6 again (not the service pack this time cos I couldn't be bothered). Did it work? No. Still 18 errors. Ok, so I decided to go for the last option; I tried installing Dev-Cpp. BUT THAT DIDN'T WORK EITHER! That got me really pissed, so I decided to post here and see if anyone has had the same problem, and have perhaps found a solution. The incriminating headers seems to be included by windows.h, and are as follows: rpcndr.h [Dev-Cpp\include] rpcdep.h [Dev-Cpp\include] wingdi.h [Dev-Cpp\include] winnt.h [Dev\Cpp\include] Edit: Tried searching for winnt.h. Results turned up in two folders: "Dev-Cpp\include\" and "Visual Studio\VC98\Include\". This is what's confusing me; How can both programs give errors on the same file if they didn't copy it from the same place? And isn't said file supposed to be included in both programs separately? o_O Edit2: Yes, I searched in hidden folders too... Edit3: Just remembered that I used package manager in Dev-Cpp to download Win32 API before I compiled. That might explain where Dev-Cpp got it's headers from, but not where VS6 got it's headers from. It also seems weird that they seemingly report on the same headers.
_______________________Afr0Games
Afr0m@n
Afr0m@n
Quote:
Original post by Anonymous Poster
What is it you want? There's nothing wrong with any version of the platform SDK headers, just fix your code instead.



What I want is to see if anyone's got anything to say about this that might help me solve my problem. Maybe Microsoft sshould solve their code instead?!

--------------------Configuration: SDL DrawImage test - Win32 Debug--------------------Compiling...main.cppc:\programfiler\microsoft visual studio\vc98\include\winnt.h(4743) : error C2143: syntax error : missing ';' before '*'c:\programfiler\microsoft visual studio\vc98\include\winnt.h(4743) : error C2059: syntax error : ';'c:\programfiler\microsoft visual studio\vc98\include\winnt.h(4743) : error C2238: unexpected token(s) preceding ';'c:\programfiler\microsoft visual studio\vc98\include\wingdi.h(2200) : error C2143: syntax error : missing ';' before '*'c:\programfiler\microsoft visual studio\vc98\include\wingdi.h(2200) : error C2059: syntax error : '['c:\programfiler\microsoft visual studio\vc98\include\wingdi.h(2200) : error C2238: unexpected token(s) preceding ';'c:\programfiler\microsoft visual studio\vc98\include\rpcdcep.h(44) : error C2143: syntax error : missing ';' before '*'c:\programfiler\microsoft visual studio\vc98\include\rpcdcep.h(44) : error C2059: syntax error : ';'c:\programfiler\microsoft visual studio\vc98\include\rpcdcep.h(44) : error C2238: unexpected token(s) preceding ';'c:\programfiler\microsoft visual studio\vc98\include\rpcndr.h(798) : error C2143: syntax error : missing ';' before '*'c:\programfiler\microsoft visual studio\vc98\include\rpcndr.h(798) : error C2059: syntax error : ';'c:\programfiler\microsoft visual studio\vc98\include\rpcndr.h(798) : error C2238: unexpected token(s) preceding ';'c:\programfiler\microsoft visual studio\vc98\include\wtypes.h(1044) : error C2628: 'LONGLONG' followed by 'signed' is illegal (did you forget a ';'?)c:\programfiler\microsoft visual studio\vc98\include\wtypes.h(1044) : error C2628: 'LONGLONG' followed by '__int64' is illegal (did you forget a ';'?)c:\programfiler\microsoft visual studio\vc98\include\wtypes.h(1044) : error C2208: '__int64' : no members defined using this typec:\programfiler\microsoft visual studio\vc98\include\objidl.h(7311) : error C2143: syntax error : missing ';' before '*'c:\programfiler\microsoft visual studio\vc98\include\objidl.h(7311) : error C2059: syntax error : ';'c:\programfiler\microsoft visual studio\vc98\include\objidl.h(7311) : error C2238: unexpected token(s) preceding ';'c:\programs\c++\sdl\sdl drawimage test\main.cpp(109) : warning C4018: '>' : signed/unsigned mismatchc:\programs\c++\sdl\sdl drawimage test\main.cpp(154) : warning C4018: '>' : signed/unsigned mismatchc:\programs\c++\sdl\sdl drawimage test\main.cpp(174) : warning C4018: '>' : signed/unsigned mismatchError executing cl.exe.SDL DrawImage test.exe - 18 error(s), 3 warning(s)


Edit: If anyone hasn't got it yet; I've tried THREE different compilers and all of them seems to be complaining about the SAME headers!
_______________________Afr0Games
Oluseyi
Oluseyi
Edit: Why are you including files for VC 98? Something's probably screwy with your include directories.
Afr0m@n
Afr0m@n
Quote:
Original post by Oluseyi
Edit: Why are you including files for VC 98? Something's probably screwy with your include directories.


Because I'm trying to make VS 6 work?

Kalasjniekof: I might try that if I'm desperate enough. I'm very tired of VS2005 already though, since it's caused me so many problems. Thanks though!
_______________________Afr0Games
Kalasjniekof
Kalasjniekof
Keep trying though, VC6 in terms of CS is as ancient as a dinosaur...
Expect to see a lot of syntax errors in code you have written yourself, as VC6 was released before the latest standards.
Afr0m@n
Afr0m@n
Quote:
Original post by Oluseyi
Edit: Why are you including files for VC 98? Something's probably screwy with your include directories.


I just did this:

#define _WIN32_WINDOWS 0x0410

That didn't work. Is there any other windows version numbers I could try?

Kalasjniekof: Yeah, I'm going to keep on trying. Thanks!
_______________________Afr0Games
owiley
owiley
VS 101


VC6 comes with win32 api which include everything from opengl to mfc...Yes,yes mfc. But to use VC6 one need to know what they are doing... First thing I will suggest is try the template that come with the package and dont add code just build if error raise then there is a problem with how your directory is setup.Even if you unistall the problem will still be there.

How to fix read the product user guide or other important info.

Platform 101

What is the platform api?

This is the updated win32 api for developing software on windows 2000 and greater.

dev c++

This is free and worth it.

Dev c++ is nice for people just learning c/c++. The win32 api is included but is different than the vs win32 because this is a port for mingw.
[edited]

also the way you include headers and use of macros can and would impact the way a project reads.

Some macros are defined by compiler like vc6's DEBUG mode

VC_LEAN keeps the windows.h file from include extra headers

[Edited by - owiley on December 15, 2005 12:29:02 AM]
Bring more Pain
Drethon
Drethon
Missing ; or ) can cause compile errors in the include files due to the compiler parsing. If you haven't already, go over your code with a fine tooth comb and varify all your formatting.
My $0.02

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.