Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Linking issue with OpenWatcom 1.6
killerbot:
also check this :
http://forums.codeblocks.org/index.php/topic,4876.msg38116.html#msg38116
I don't remember if I already changed it, but linker exe should be wlink.exe and not wcl386
Can you confirm ?
Biplab:
wcl386.exe can handle linking request, too. If you use wlink.exe then the commands for linker has to be generated in a specific way which I have written in the first post. Though this is not very difficult, but the linker command generation has to be revamped in that case. :)
I'm putting some more test results. One for Console Application and another for Win32GUI app. Both of them compile and link perfectly with my changes. I've already posted build-log for a wxWidgets sample app.
Console Build-log:
--- Quote ----------------- Build: Release in Test ---------------
wcl386.exe -q -c -wx -xs -ot -iC:\watcom\h -iC:\watcom\h\nt -fo=obj\Release\main.obj main.cpp
wcl386.exe -q /"LIBP C:\watcom\lib386" /"LIBP C:\watcom\lib386\nt" obj\Release\main.obj -fe=.\Test.exe
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End quote ---
Win32 GUI Build-log:
--- Quote ----------------- Build: Debug in Test ---------------
wcl386.exe -q -c -wx -d2 -iC:\watcom\h -iC:\watcom\h\nt -fo=obj\Debug\main.obj main.cpp
main.cpp(69): Warning! W726: col(1) no reference to formal parameter 'hPrevInstance'
main.cpp(10): Note! N392: col(32) definition: 'void * hPrevInstance' in 'int stdcall WinMain( void *, void *, char *, int )'
main.cpp(69): Warning! W726: col(1) no reference to formal parameter 'lpszArgument'
main.cpp(11): Note! N392: col(28) definition: 'char * lpszArgument' in 'int stdcall WinMain( void *, void *, char *, int )'
wcl386.exe -q /"LIBP C:\watcom\lib386" /"LIBP C:\watcom\lib386\nt" obj\Debug\main.obj -fe=bin\Debug\Test.exe gdi32.lib user32.lib kernel32.lib
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 4 warnings
--- End quote ---
I hope this can solve most of the issues with supporting OpenWatcom.
Regards,
Biplab :)
killerbot:
please do check and test if you can :
m_Programs.LD = wxT("wcl386.exe");
should be
m_Programs.LD = wxT("wlink.exe");
It really should be like that, but I haven't had time to check the options.
Maybe then that other option is no longer needed.
Feel free to email or PM me about it.
Always good it our compiler support improves. Thumbs up to Biplab ;-)
I think we should do it like that : link : use the linker, Those front end do all stuff are bad ideas, it's even a pure contradiction to object oriented programming and they always generate command line option conflicts ...
Biplab:
--- Quote from: killerbot on February 27, 2007, 11:25:29 am ---please do check and test if you can :
m_Programs.LD = wxT("wcl386.exe");
should be
m_Programs.LD = wxT("wlink.exe");
--- End quote ---
I didn't get you exactly. Are you asking me to change linker to wlink.exe and then test it? :)
IMHO, that'll take us to override in the following functions.
* CompilerCommandGenerator::SetupLibrariesDirs
* CompilerCommandGenerator::SetupLinkerOptions
* CompilerCommandGenerator::SetupLinkLibraries
And also some other functions. This will take some time. :)
Thus I changed it to -
--- Code: ---/"LIBP <Lib_Dir>
--- End code ---
The following command will also work perfectly with wcl386.exe -
--- Code: ----"LIBP <Lib_Dir>"
--- End code ---
:D
killerbot:
yes, that was my question.
Do we really need those overrides. There are other compilers that also have a different exe for linking (MS ?) ...
If I recall there was also an issue when you wanted to add several dirs ? Those that LIBP allow multiple dirs ?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version