Somebody help......
Hey guys, I ran into a really weird problem, everytime i want to copy the source file from another project to my new-created project in vc 6.0, i got these problems, this reall drives me crazy.
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing ';' before type 'void'
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found
i want to kill myself..........its really frustrating
actually, i tried to copy the source code from another .cpp, these problems show up, but the weird thing is that, if i type codes same as the .cpp, i can compile and run it successfully......
Killing yourself is a little extreme.
Instead, try "cleaning" your solution and if that doesn't help, posting your code here (the same code that gives you the error, not the compiling code after you've typed it in correctly) instead of just the error messages. It sounds like you forgot a semicolon at the end of a class or have mismatched braces... But this is a guess.
Chances are you fixed it while typing it in, but the source had one of the aforementioned errors.
Instead, try "cleaning" your solution and if that doesn't help, posting your code here (the same code that gives you the error, not the compiling code after you've typed it in correctly) instead of just the error messages. It sounds like you forgot a semicolon at the end of a class or have mismatched braces... But this is a guess.
Chances are you fixed it while typing it in, but the source had one of the aforementioned errors.
In addition to what's been said, may I also humbly suggest that you get a better set of tools to work with? Visual C++ 6.0 is very old. Microsoft offers a much more up to date set of tools for free.
Agreed, you really, really shouldn't be using VC6 these days. It's a decade out of date, and there are newer and improved alternatives freely available.
Sounds as if WINGDIAPI is unknown to the compiler at the location where you added your copied code. Chances are that you did not include the correct header making this declaration while in the .cpp file the file is included (maybe by including other headers that include the missing one, such as gl.h).
Quote:Original post by huaihongwu
Hey guys, I ran into a really weird problem, everytime i want to copy the source file from another project to my new-created project in vc 6.0, i got these problems, this reall drives me crazy.
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing ';' before type 'void'
See the highlighted bit? That's the year your compiler was released. As in 1998. As in 11 years ago. You might want to get a newer version. It's free. VC6 doesn't actually even compile standard C++.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement