# Problems on Vista?

## Recommended Posts

Hi all, Having problems compiling visual c++ v6.0 programs on our new vista machine. Programs that worked fine on XP now generate hundreds (liteally) of syntax errors in windef.h and wingdi.h. Examples: c:\program files\microsoft visual studio\vc98\include\windef.h(171) : error C2061: syntax error : identifier 'LPARAM' c:\program files\microsoft visual studio\vc98\include\windef.h(171) : error C2059: syntax error : ';' c:\program files\microsoft visual studio\vc98\include\windef.h(172) : error C2061: syntax error : identifier 'LRESULT' c:\program files\microsoft visual studio\vc98\include\windef.h(172) : error C2059: syntax error : ';' c:\program files\microsoft visual studio\vc98\include\windef.h(204) : error C2143: syntax error : missing '{' before '*' c:\program files\microsoft visual studio\vc98\include\windef.h(205) : error C2143: syntax error : missing '{' before '*' c:\program files\microsoft visual studio\vc98\include\windef.h(206) : error C2061: syntax error : identifier 'HGLOBAL' c:\program files\microsoft visual studio\vc98\include\windef.h(206) : error C2059: syntax error : ';' We did all the "prep" work with visual c+++ (adding glut.h, glu.h, etc to \include\GL, etc.) but it still gives us the errors. Any help appreciated. Thanks in advance

##### Share on other sites
This is a complete guess.. but looking at your errors I'm wondering if you need to download and install the platform SDK?

##### Share on other sites
I'll go on the Microsoft website and give that a try...will let you know what happens. Thanks

##### Share on other sites
Make sure windows.h is included before you try to include GL or GLUT, too.

##### Share on other sites
Quote:
 Original post by wcotteeHaving problems compiling visual c++ v6.0 programs on our new vista machine....c:\program files\microsoft visual studio\vc98\include\windef.h(171) : error C2061: syntax error : identifier 'LPARAM'
You're saying that you're compiling on Vista using VC6.0 and VC6.0 header files?
If so, I'm surprised you managed to get so far with it.
I must say I was also trying to mantain VC6 (I was happy with it after all). A few years ago however, the time needed to fix header issues did accumulate and I gave VC2005 a try.
It's a definite step foward. You should really update it (MS gives you the Express version for free).

##### Share on other sites
I hate the express edition - it doesn't even have a resource editor! Stay with the standard edition, even if it's old. Obviously the new standard edition is ideal, but I strongly prefer the old standard to the new express. (see my other thread at http://www.gamedev.net/community/forums/topic.asp?topic_id=443057)

##### Share on other sites
nemesisgeek ; yours is a relatively unqiue case where upgrading isn't an option.

For the vast majority of users, including those programming OpenGL, having a standard compliant tool is going to be more important than a lack of resource editor.

(also, for anyone starting a new GUI project C++ is totally the wrong tool these days, C# would be much better)

##### Share on other sites
Quote:
 Original post by phantomnemesisgeek ; yours is a relatively unqiue case where upgrading isn't an option. For the vast majority of users, including those programming OpenGL, having a standard compliant tool is going to be more important than a lack of resource editor. (also, for anyone starting a new GUI project C++ is totally the wrong tool these days, C# would be much better)

Unless you have to pass data between your C++ code and the C# UI. Then you have to code all the pain in the butt marshal by ref statements or do special conversions, especially for things like strings, etc....

There is nothing wrong with doing the UI in C++, you can access any of the features you can in C#. No difference at all besides the syntax.

##### Share on other sites
Quote:
 Original post by phantom(also, for anyone starting a new GUI project C++ is totally the wrong tool these days, C# would be much better)

*Shrug* Depends on the existing GUI library framework you already have.

##### Share on other sites
Quote:
Original post by Yann L
Quote:
 Original post by phantom(also, for anyone starting a new GUI project C++ is totally the wrong tool these days, C# would be much better)

*Shrug* Depends on the existing GUI library framework you already have.

Ditto. Personal opinion. I agree with YannL, right tools with C++ is just as easy as C#. Depends on what you want to use and do.

##### Share on other sites
Thanks to everyone for the advice...downloaded Visual C++ Express and will start using it instead of v6.0 (If I can get our Vista machine to stop crashing!!)

##### Share on other sites
Quote:
 Original post by nemesisgeekI hate the express edition - it doesn't even have a resource editor! Stay with the standard edition, even if it's old. Obviously the new standard edition is ideal, but I strongly prefer the old standard to the new express. (see my other thread at http://www.gamedev.net/community/forums/topic.asp?topic_id=443057)

I have no issues with the lack of Resource Editor. There are many handy tools to create resources externally, just go and Google :)

##### Share on other sites
Quote:
 Original post by nemesisgeekI hate the express edition - it doesn't even have a resource editor! Stay with the standard edition, even if it's old. Obviously the new standard edition is ideal, but I strongly prefer the old standard to the new express. (see my other thread at http://www.gamedev.net/community/forums/topic.asp?topic_id=443057)

I got the new standard edition last week - for \$10.17 - from Microsoft's pre-'07-release clearance sale on Visual Studio '05. The only problem I have with it is the new standard-compliant scoping of for-loop variables.

Standard-compliant code such as
[source lang=cpp]for(int i=0;i<5;i++){  //do something}for(int i=0;i<15;i++){  //do something else}

[source lang=cpp]for(int i=0;i<5;i++){  //do something}for(i=0;i<15;i++){  //do something else}

Note that "i" is declared once. Now, VC 2005 says that "i" is an undeclared variable in the second loop. This breaks most of my 30,000 line game engine and map editor until I fix all of my for loops!

I'm stuck with 2005 now, because I came across some code-generation bugs in VC6 that caused problems.

##### Share on other sites
Quote:
 Original post by nemesisgeekNote that "i" is declared once. Now, VC 2005 says that "i" is an undeclared variable in the second loop. This breaks most of my 30,000 line game engine and map editor until I fix all of my for loops!

Well, the "correct" way to fix that in VC6 was:

for ( int i = 0; i < whatever; ++i ){}for ( int j = 0; j < whatever; ++j ){}

That way the code remained portable and would continue to work when that bug was eventually fixed.

No big deal. Would probably just take a day or so to fix the compiler errors. But it's one of the many reasons why so many of us are so hostile to that POS compiler. [smile]

-me

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628356
• Total Posts
2982251

• 10
• 9
• 13
• 24
• 11