Skip to main content
gamedev.net
🔒 Locked

Problem with preprocessor

Started by bigfatsumo Jun 24, 2005 at 10:18 AM 2 replies 1.4k views
Original Post
bigfatsumo
bigfatsumo
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?
Rain Dog
Rain Dog
I had no problem compiling it.

I use vc 7.1 however.
Deyja
Deyja
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.
Deyja
Deyja
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.