Sign in to follow this  

Problem with preprocessor

This topic is 4559 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4559 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this