leaving "Add paths to project" checked, while unchecking "Use relative path" will cause error: |
I can’t remember having had any bad experience leaving those options to their default values, but I moved to Qt Creator long time ago and perhaps my memory betrays me.
Official Code::Blocks documentation is not of much help
http://wiki.codeblocks.org/index.php/Class_Wizard_plugin
But a guy in this post
http://stackoverflow.com/questions/21500724/c-undefined-reference-to-winmain16-codeblocks
suggests not to tick “Use relative path”.
Having re-installed Code:Blocks and created three empty class A, B and C playing with those options, I couldn’t find any difference, but for a row added in the ‘.cbp’ file (which you can open with a normal text editor):
<Add directory="/home/...[path to the project]..."
I’m sorry not being able to give you better advice, even because my instinct would be to set the relative path option on, because it sounds like it could allow you to move your project from a pc to another just copying the containing folder. But perhaps you could find more information on some Code::Blocks specific forum.
Anyway, it’s a well known bug of Code::Blocks that it doesn’t work properly the first time: it needs to be closed and restarted. Maybe, after having restarted it, in new projects you won't meet all those compilation errors.
it seems that for the main.cpp file you must include all of your .h or header files. |
Well, it should not... or perhaps I don’t understand the issue.
Please, try restarting and creating a new project. If it doesn’t solve, just post again, but adding your code, and perhaps somebody would find the solution.