Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Linking issue with OpenWatcom 1.6
Biplab:
Thanks for the clarification.
--- Quote from: killerbot on February 27, 2007, 12:07:44 pm ---Do we really need those overrides. There are other compilers that also have a different exe for linking (MS ?) ...
--- End quote ---
I believe partly its necessary. E.g., wlink.exe will not take -q command rather we have to supply, option quiet. So we need to map some of the common options to it's equivalent options in wlink.
But I also believe that it won't be difficult to switch to wlink.exe
--- Quote from: killerbot on February 27, 2007, 12:07:44 pm ---If I recall there was also an issue when you wanted to add several dirs ? Those that LIBP allow multiple dirs ?
--- End quote ---
AFAIK, Multiple directories can be specified with multiple LIBP or /"LIBP <Lib_Dir1>;<Lib_Dir2>;<Lib_Dir3>". So it can take multiple directories. :)
Biplab:
@Killerbot & Mandrav,
Here is the latest changes. I've updated compiler plugin to use wlink.exe instead of wcl386.exe. I've successfully compiled Win32 GUI App, wxWidgets App. I'm attaching the build-logs. :D
Win32 GUI App:
--- Quote ----------------- Build: Release in TestWin ---------------
wcl386.exe -q -c -wx -ot -iC:\watcom\h -iC:\watcom\h\nt -fo=obj\Release\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 )'
wlink.exe option quiet system nt_win ref '_WinMain@16' LIBP C:\watcom\lib386 LIBP C:\watcom\lib386\nt file obj\Release\main.obj name bin\Release\TestWin.exe
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 4 warnings
--- End quote ---
wxWidgets App:
--- Quote ----------------- Build: Release in Test ---------------
wcl386.exe -q -c -d__WXMSW__ -d__WINDOWS__ -d_WINDOWS -dWXUSINGDLL -dUNICODE -bm -br -bt=nt -zq -xr -xs -wcd=549 -wcd=656 -wcd=657 -wcd=667 -wx -ot -ox -iC:\wxMSW-2.9.0\include -iC:\wxMSW-2.9.0\contrib\include -iC:\wxMSW-2.9.0\lib\wat_dll\mswu -iC:\watcom\h -iC:\watcom\h\nt -fo=obj\Release\TestMain.obj TestMain.cpp
TestMain.cpp(86): Warning! W726: col(1) no reference to formal parameter 'event'
TestMain.cpp(83): Note! N392: col(39) definition: 'wxCloseEvent & event' in 'void TestFrame::OnClose( wxCloseEvent & )'
TestMain.cpp(91): Warning! W726: col(1) no reference to formal parameter 'event'
TestMain.cpp(88): Note! N392: col(40) definition: 'wxCommandEvent & event' in 'void TestFrame::OnQuit( wxCommandEvent & )'
TestMain.cpp(97): Warning! W726: col(1) no reference to formal parameter 'event'
TestMain.cpp(93): Note! N392: col(41) definition: 'wxCommandEvent & event' in 'void TestFrame::OnAbout( wxCommandEvent & )'
wrc.exe -q -r -fo=obj\Release\resource.res -iC:\wxMSW-2.9.0\include -iC:\wxMSW-2.9.0\lib\wat_dll\mswu -iC:\watcom\h -iC:\watcom\h\nt resource.rc
wcl386.exe -q -c -d__WXMSW__ -d__WINDOWS__ -d_WINDOWS -dWXUSINGDLL -dUNICODE -bm -br -bt=nt -zq -xr -xs -wcd=549 -wcd=656 -wcd=657 -wcd=667 -wx -ot -ox -iC:\wxMSW-2.9.0\include -iC:\wxMSW-2.9.0\contrib\include -iC:\wxMSW-2.9.0\lib\wat_dll\mswu -iC:\watcom\h -iC:\watcom\h\nt -fo=obj\Release\TestApp.obj TestApp.cpp
wlink.exe option quiet system nt_win ref '_WinMain@16' LIBP C:\watcom\lib386 LIBP C:\watcom\lib386\nt LIBP C:\wxMSW-2.9.0\lib\wat_dll file obj\Release\TestMain.obj file obj\Release\TestApp.obj name bin\Release\Test.exe library wxmsw29u.lib option resource=obj\Release\resource.res
Process terminated with status 0 (0 minutes, 13 seconds)
0 errors, 6 warnings
--- End quote ---
Please remember that the changes have been applied only to Win32 Apps. Console apps are NOT supported yet. Currently this is hard-coded and I'll change it later.
So we can move toward supporting OpenWatcom with wlink.exe :D
I'm leaving lab so I won't be able to make any further changes till tomorrow morning. But I'll be available for discussion.
I'm sorry I couldn't complete creating patch. So I can't post it right now.
BTW, if you want the compiled binary to test please post, I'll upload it somewhere. :) The compiled binary will ship with latest wxWidgets wizard supporting OpenWatcom. ;)
Regards,
Biplab
Biplab:
Latest Update:
Now Console App, DLL App, Win32 App are supported. Only -d2 option is supported, though there are other debug related options but they are not mapped yet.
Test Results:
Command Line App:
--- Quote ----------------- Build: Debug in TestConsole ---------------
wcl386.exe -q -c -wx -xs -d2 -iC:\watcom\h -iC:\watcom\h\nt -fo=obj\Debug\main.obj main.cpp
wlink.exe option quiet debug watcom all LIBP C:\watcom\lib386 LIBP C:\watcom\lib386\nt file obj\Debug\main.obj name .\TestConsole.exe
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
-------------- Build: Release in TestConsole ---------------
wcl386.exe -q -c -wx -xs -ot -ox -iC:\watcom\h -iC:\watcom\h\nt -fo=obj\Release\main.obj main.cpp
wlink.exe option quiet system nt LIBP C:\watcom\lib386 LIBP C:\watcom\lib386\nt file obj\Release\main.obj name .\TestConsole.exe
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End quote ---
Win32 App:
--- Quote ----------------- Build: Debug in TestWin ---------------
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 )'
wlink.exe option quiet debug watcom all LIBP C:\watcom\lib386 LIBP C:\watcom\lib386\nt file obj\Debug\main.obj name bin\Debug\TestWin.exe library gdi32 library user32 library kernel32
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 4 warnings
-------------- Build: Release in TestWin ---------------
wcl386.exe -q -c -wx -ot -iC:\watcom\h -iC:\watcom\h\nt -fo=obj\Release\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 )'
wlink.exe option quiet system nt_win LIBP C:\watcom\lib386 LIBP C:\watcom\lib386\nt file obj\Release\main.obj name bin\Release\TestWin.exe library gdi32 library user32 library kernel32
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 4 warnings
--- End quote ---
DLL:
--- Quote ----------------- Build: Release in TestDLL ---------------
wcl386.exe -q -c -wx -ot -iC:\watcom\h -iC:\watcom\h\nt -fo=obj\Release\main.obj main.cpp
main.cpp(37): Warning! W726: col(1) no reference to formal parameter 'hinstDLL'
main.cpp(15): Note! N392: col(31) definition: 'void * hinstDLL' in 'int stdcall DllMain( void *, unsigned long, void * )'
main.cpp(37): Warning! W726: col(1) no reference to formal parameter 'lpvReserved'
main.cpp(15): Note! N392: col(65) definition: 'void * lpvReserved' in 'int stdcall DllMain( void *, unsigned long, void * )'
wlink.exe option quiet LIBP C:\watcom\lib386 LIBP C:\watcom\lib386\nt name .\TestDLL.dll file obj\Release\main.obj system nt_dll
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 4 warnings
--- End quote ---
Debug Target is not linking properly.
There are number of compiler options to be mapped to be mapped properly.
Navigation
[0] Message Index
[*] Previous page
Go to full version