PDA

View Full Version : Any Ideas what might cause this Problem with MS VC++ compiler



jubei_GL
05-08-2002, 07:08 AM
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\nb30.h(97) : error C2059: syntax error : 'string'
d:\microsoft visual studio\vc98\include\nb30.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.....

Sandeep
05-08-2002, 10:55 AM
http://nehe.gamedev.net/tutorials/lesson.asp?l=01

go to the link and add libraries written there....

Deiussum
05-08-2002, 11:16 AM
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.

zeckensack
05-08-2002, 11:24 AM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif

mikael_aronsson
05-10-2002, 11:54 AM
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