Any Ideas what might cause this Problem with MS VC++ compiler

Ok I compile my .cpp files and execute the main.cpp, everything works perfectly… THen when I go to compile my main.cpp file again after creating .exe, I get those errors :

Compiling…
main.cpp
d:\microsoft visual studio\vc98\include
b30.h(97) : error C2059: syntax error : ‘string’
d:\microsoft visual studio\vc98\include
b30.h(97) : error C2238: unexpected token(s) preceding ‘;’
d:\microsoft visual studio\vc98\include\winsock.h(714) : error C2143: syntax error : missing ‘)’ before ‘string’
d:\microsoft visual studio\vc98\include\winsock.h(714) : error C2143: syntax error : missing ‘;’ before ‘string’
d:\microsoft visual studio\vc98\include\winsock.h(714) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

Camera.exe - 5 error(s), 0 warning(s)

Any Ideas what is wrong ??? I never had those problems before… I am using VC++ 6.0 … I also got the update patch for it…

The only solution for this right now, that I know, is to Delete all files that were created after compile, and Compile all .cpp’s again…

http://nehe.gamedev.net/tutorials/lesson.asp?l=01

go to the link and add libraries written there…

That’s weird. Do you have using namespace std in your main.cpp? Other than that the only suggestion I’d have is to try do a build->clean.

Funny. I guess the compiler is just choking on something. Are you using templates or anything else possibly ‘too complicated’?
Maybe, in this is just a maybe as I haven’t seen anything like this yet, your problem goes away if you turn off precompiled headers or incremental linking or minimum rebuild. Or a combination

Hi !

The minimum rebuild option can be tricky, and may cause this kind of weird problems, I have noticed some pretty odd behavior when used with lots of templates for example.

The good thing is that Microsoft has added even more odd behavior to the new Visual Studio.NET

Mikael