Hey there,
I started to try code::blocks yesterday, therefore I cannot exclude user-error, but the following seems like a bug to me (It's perfectly reproducible).
Code::Blocks version 13.12, 64bit. (From the ubuntu-repos as of yesterday), OS is 64-Bit Ubuntu 14.04.
1) Create Console Application, C++, named TP (for "TestProject"), everything else as given.
* Build and run of the Hello-World Template works fine.
2) Add new class via File->new->class, named tc (for "testclass"), everything else as given, add to project, add to debug and release target.
* At this point build&run as well as rebuild are giving errors. "undefined reference to 'main'"
I thought this would be an error on my side, but the following fixes it:
3) Make any change under Project->Build Options, e.g. tick -pg flag and immediatly untick it, hit OK.
* Rebuild and build&run now work perfectly again. Without making any real changes, besides that the build options may have gotten flagged as "updated"?
Update on 3): I don't actually have to hit anything - opening Project->Build Options and hitting OK is enough to fix everything.
So all in all this means, that after creating a new class I have to do something in the build options (even if it has no effect, like checking and immedietly unchecking a box) to be able and build my project again.
I' be happy if anyone could give me some input on this one.
Greetings
Thomas