As explained a little higher (http://forums.codeblocks.org/index.php?topic=1556.msg11219#msg11219), Codeblocks has a bug. It does not take into accound the objects extension set in the compiler switches. You always get file.o, and for example for OpenWatcom where .obj is specified, you don't get file.obj.
I have found the offending lins of code, or the lack of code that's needed.
file : Projectfile.cpp
method : void pfDetails::Update(ProjectBuildTarget* target, ProjectFile* pf)
In this method we retrieve the objectname from the projectfile. This name is with the .o extension (default extension).
But then we should check the current target to see what compiler it is using, and if needed adjust accordingly the extension.
So the code :
should become :
tmp = pf->GetObjName();
Compiler* compiler = CompilerFactory::Compilers[target->GetCompilerIndex()];
const CompilerSwitches& switches = compiler->GetSwitches();
tmp.SetExt(switches.objectExtension);
With this applied, I am able to build the hello world test program with pen Watcom, and !!! it even runs fine.
Yiannis, could you update the mentioned file with this fix ?
kind regards,
Lieven