🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Problem with preprocessor

Started by
2 comments, last by Deyja 19 years ago
I tried adding the preprocessor stuff from the articles section to my project. I added in the includes and the files into my MSVC6 project and got the following errors: C:/cpp/scripting/preprocessor/lex.h(50) : error C2059: syntax error : 'constant' C:/cpp/scripting/preprocessor/lex.h(54) : error C2143: syntax error : missing ';' before '}' C:/cpp/scripting/preprocessor/lex.h(60) : error C2146: syntax error : missing ';' before identifier 'type' C:/cpp/scripting/preprocessor/lex.h(60) : error C2501: 'LexemType' : missing storage-class or type specifiers C:/cpp/scripting/preprocessor/lex.h(60) : error C2501: 'type' : missing storage-class or type specifiers C:/cpp/scripting/preprocessor/lex.h(65) : error C2143: syntax error : missing ';' before '}' C:/cpp/scripting/preprocessor/lex.h(65) : error C2143: syntax error : missing ';' before '}' C:/cpp/scripting/preprocessor/lex.h(65) : error C2143: syntax error : missing ';' before '}' does anyone know how to correct this?
Advertisement
I had no problem compiling it.

I use vc 7.1 however.
Is this my preprocessor?

It compiles error and warning free for me, on warning level 4. I am using MSVC8.0. I don't have the tools to test it on anything lower.

First, make sure you have the latest version (available from my website, www.omnisu.com) and - well. I'll look into it.
Oh very odd. Line 50 of lex.h happens to be 'IGNORE,', a constant in an enum list. There should be no way you can trample that with the C++ preprocessor either. You should only include the file 'preprocess.h'. Don't include any of the other files yourself. If you are including lex.h yourself, then IGNORE, or perhaps WHITESPACE, is a macro in a header included before it.

This topic is closed to new replies.

Advertisement