Author Topic: Strange behavior at compilation  (Read 3252 times)

bobofjoe

  • Guest
Strange behavior at compilation
« on: March 25, 2007, 05:39:42 am »
As of yesterday, my Code::Blocks (SVN 3737) refused to acknowledge that one of my files had changed, and would not compile the project at all. Even when I completely deleted half the file at random, clicking on "build and run" would pop up the message "nothing to be done" and stop compiling. Since this project was not horribly big, I decided to recompile the project from scratch.

However, this has not made the problem much better. Though now every time I click on compile and run, it re-builds the project from scratch, which is not the behavior I expect. I expect the compiler to only recompile the edited file, and any of its dependencies. Interestingly enough, this only happens on a single project - any new project I create compiles in the correct way. However, if I create a new project and import all of my original files from the buggy project, the building bug springs up once again.

I am currently using the minGW C++ compiler, on Windows XP Service Pack 2. The project does not use any code generation, nor resources.

If anyone knows what could of caused this, or how I can fix this problem, I would be very grateful.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Strange behavior at compilation
« Reply #1 on: March 25, 2007, 01:58:11 pm »
I get this problem when I create a header file with no accompanying .cpp file.

To resolve the problem, I created a "do nothing" .cpp to accompany the .h and added both to the project.

CB added the .cpp to the dependencies and it all worked again.