The default console application wizard uses "obj\Debug" and "obj\Release" as output dir for executables. But it doesn't work. Executables always generated in the project's root folder. So i tried to do find out the reason and did some change in "share\CodeBlocks\templates\wizard\console\wizard.script".
Origin
target.SetTargetType(ttConsoleOnly);
if (target.GetWorkingDir().Matches(_T("")))
target.SetOutputFilename(target.SuggestOutputFilename());
else
target.SetOutputFilename(target.GetWorkingDir() + wxFILE_SEP_PATH + target.SuggestOutputFilename());
Change to
target.SetTargetType(ttConsoleOnly);
// if (target.GetWorkingDir().Matches(_T("")))
// target.SetOutputFilename(target.SuggestOutputFilename());
// else
// target.SetOutputFilename(target.GetWorkingDir() + wxFILE_SEP_PATH + target.SuggestOutputFilename());
// Changed by shajunxing 07.03.05
if (is_debug)
{
target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);
}
else
{
target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);
}
// end of Changed
Now it works well. The executables and objects are also in the same folder("Debug" or "Release") which looks more comfortable.
:lol: