- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I am trying to compile code with defined preprocessor, however, it displayed 'illegal token on preprocessor directive line' when compiling. I have attached the test project. Could anyone help me to take a look at it?
Thanks,
Tang Laoya
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your source files have unprintable characters on the same line as your preprocessor statements. I saw this using a "vi"-like editor here.
What editor did you use to insert those preprocessor statements? Or, did you simply cut-and-paste from an email or web site? Sometimes that adds Unicode characters that you can't see with some text-based editors
I would remove the lines, and re-type them in your Visual Studio editor, especially if you'd copied them from an external source.
Then try building again.
Finally, in case you ever need to report a problem again, in order to reproduce your failure in a Visual Studio solution, we need the .sln file and the .vfproj file. The second file contains all the project settings and is helpful when trying to understand what command line options provoke an issue.
The .suo file is not relevant.
--Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Lorri,
Thank you very much for your kindly reply. Yes, it's exactly what you said. After removed the illegal characters, the project works.
Thanks,
Tang Laoya

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page