Compiler Error When I Compile More Than Once

Jun 5, 2013 at 10:47pm
I'm currently following along in a book that teaches DirectX. I started using Dev-C++ but after complications with the software and DirectX I moved on to Code::Blocks, everything seemed to be going fine until I got the following error after compiling:

 
  File: :0 Line: 1 Message: error: macro names must be identifiers


Now, let me explain a little further. code::blocks will compile my code perfectly fine the VERY first time I compile it. it runs smooth and everything is fine and dandy. However, without even changing ANY of the current code that I have, I'll re-compile and I'll get the error

 
  File: :0 Line: 1 Message: error: macro names must be identifiers


two things I don't understand:

1. why does the compiler compile my code perfectly fine exactly ONE time, and always give me the error on everything after that.

2. what is File: :0

NOTE: after this error occurs I cannot compile anything at all, not even a regular c++ console application under a completely different project file. The only way that I've been able to get the problem to stop is to completely uninstall Code::Blocks and re-install it, along with uninstalling DirectX SDK and re-installing it as well. But that isn't a permenant fix. As soon as I re-use the application and compile that one time, anytime I re-compile after that I get the exact same error.

Jun 6, 2013 at 12:27am
I have ABSOLUTELY no idea what I did. but I got it to compile correctly each time without the error

 
File: :0 Line: 1 Message: error: macro names must be identifiers


litterally the only thing I did was go to settings in Code::Blocks -> Compiler Settings > and under the tab for Compiler Settings and sub-tab of "Other Options" added and then removed some text.

I think I might need to read up on how compilers work.

sorry to waste yall's time.
Topic archived. No new replies allowed.