-
new error message for me
I'm getting an error message I've not encountered before. The message is:
....player.cpp(14) : error C2059 : syntax error : 'PCH creation point'
player.cpp is the cpp file for a class called Player. The error always occurs at the first line of the code after the #include "Player.h" line, even if I comment out the first line by placing the original first line in the header file instead of the cpp file. The error goes away when I strip the class down to an empty default constructor and empty default destructor and I'm building the file back piece by piece to see what seems to trigger the error, and I'll hopefully be able to fix it that way, but knowing where to look and understanding the error might decrease the debugging time. Anybody know what that error means?
VC 6.0
Windows 98
Thanks.
-
Remove the "Use precompiled header" option from your project options. It's got to do something with that.
-
Thanks for the idea. I'll look into that and post what I come up with later. Any other ideas welcome.
-
For the love of pete! The error wasn't even in the player.cpp file. It was in the player.h file. I had a ) instead of } at the end of a one line method body. How or what that has to do with a PCH creation point, or even what the heck a/the PCH creation is, is something I don't understand. But correcting the syntax resolved the error message. So much for helpful error messages!
I take that back. I have to admit the error messages are usually pretty helpful. And, it's a lot better with 'em than without 'em!!!
-
PCH means Pre-Compiled-Header. Turn that feature off in the project settings, I have yet to encounter a project where it would have been useful for something else then annoying and superfluent error messages.
-
nvoigt: large project. Very large projects. It can immensely speed up compilation there.
-
I do have projects that compile for 10 Minutes or more, but still, the compilation speed gain does not outweight the constant harrassment of PCH error messages from my point of view especially when you have to include other peoples code and don't have control over 100% of the source.
After all you don't have to compile it more than once per hour and taking a break isn't that bad anyway :D
-
I thought pre-compiled headers referred to standard header files, and things like stdafx.h. It didn't dawn on me until just now that any header compiled before the current file could be considered pre-compiled and that the compiler could keep track of those files that didn't change between last compiling and current run to increase speed of compiling. Duh.
-
nvoigt, I'm referring to projects like Mozilla, which compile for an hour or more.