User forums > General (but related to Code::Blocks)
Anyone with OpenWatcom experience ?
takeshimiya:
I must note that I forgot to say that the last week I noticed the exactly same problem (.o and .obj) with Code::Blocks but with a different compiler: DMars.
tiwag:
thers is another bug too in these compilersets since the config was changed from registry to xml file default.conf
you can't delete en entry, it gets always restored to the default value when CB restarts
killerbot:
while debugging codeblocks, I suddenly noticed that the 'debugged Cb' now showed the following command line :
wcl386.exe -c -fo=.objs\main.o main.cpp
--> even worse : the include paths were no longer hand over.
Ok, I already see where's the problem : if you do rebuild (or build), then you get :
wcl386.exe -c -iE:\watcom\h -iE:\watcom\h\nt -fo=.objs\main.o main.cpp
If you do compile file you get :
wcl386.exe -c -fo=.objs\main.o main.cpp
More bugs :-(
Lieven
mandrav:
--- Quote from: killerbot on December 08, 2005, 07:43:53 am ---while debugging codeblocks, I suddenly noticed that the 'debugged Cb' now showed the following command line :
wcl386.exe -c -fo=.objs\main.o main.cpp
--> even worse : the include paths were no longer hand over.
Ok, I already see where's the problem : if you do rebuild (or build), then you get :
wcl386.exe -c -iE:\watcom\h -iE:\watcom\h\nt -fo=.objs\main.o main.cpp
If you do compile file you get :
wcl386.exe -c -fo=.objs\main.o main.cpp
More bugs :-(
Lieven
--- End quote ---
Thanks for pointing it out. Fixed.
killerbot:
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 :
--- Code: --- tmp = pf->GetObjName();
--- End code ---
should become :
--- Code: --- tmp = pf->GetObjName();
Compiler* compiler = CompilerFactory::Compilers[target->GetCompilerIndex()];
const CompilerSwitches& switches = compiler->GetSwitches();
tmp.SetExt(switches.objectExtension);
--- End code ---
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
Navigation
[0] Message Index
[*] Previous page
Go to full version