Author Topic: Codeblocks sometimes doesn't recompile a project if I changed something  (Read 126 times)

Offline daniel_silva

  • Single posting newcomer
  • *
  • Posts: 1
Sometimes when I make a change to a cpp file, codeblocks doesn't recompile the program, I need to rebuild the project so I can see my changes.

Sometimes it does this and I don't know how to fix, I think restarting my pc fixes it temporarily.

I am on linux mint 22.3

Name                   : Code::Blocks
Version                : 25.03-r13644
SDK Version            : 2.25.0
Scintilla Version      : 3.7.5

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6158
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Is the cpp file(for example, you have a a.cpp file) included in your cbp project file?
You may check the modified "timestamp" of the cpp file, because Code::Blocks use this time information to track whether the file get changed or not.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.