User forums > Help
How to set up 16-bit DOS Open Watcom target linking?
ta0:
My Open Watcom (2.0 fork) installation works and can produce working .EXE's. Also, the pre-installed W32 target for Open Watcom works like expected inside C::B. So I copied it (with Settings -> Compiler -> Global compiler settings -> The "Selected compiler" box -> Copy) and then made the necessary path and toolchain changes.
The compile phase through WCL.EXE passes. WLINK.EXE, however, fails:
wlink.exe option quiet LIBP c:\watcom\lib386 obj\Debug\main.obj name bin\Debug\hello.exe
Error! E3033: directive error near 'obj\Debug\main.obj'
If I manually run this on the command line it seems that a "file" directive is missing in front of the object name, because this works:
wlink.exe option quiet LIBP c:\watcom\lib386 file obj\Debug\main.obj name bin\Debug\hello.exe
I cannot find where this file directive is specified in the built-in W32 Open Watcom target. What is going on?
ta0:
Update:
In OW W32, there this line in Settings -> Compiler -> Global compiler settings -> Other settings -> Advanced options -> Commands -> Command: "Link object files to console executable":
$linker option quiet $link_options $libdirs $link_objects name $exe_output $libs $link_resobjects
If, for my OW DOS-16 target, I change that line to:
$linker option quiet $link_options $libdirs file $link_objects name $exe_output $libs $link_resobjects
then it will build successfully, but for single object projects only, of course. So my question is how does the file "prefix" end up before every $link_objects object?
And if there's no immediate fix for this, how can I override the linker and use my own static linking line from within C::B ?
stahta01:
Did you try setting the object directory to "." as a work around?
Note: Do not use the quotes just use the period.
If that does not work I would try using empty or space in the object directory setting.
Tim S.
ta0:
Thanks for replying, but I think you misunderstand.
The problem is that my copied configuration does not output the directive file before the $link_objects when making the arguments string for wlink.
What is really surprising is that the target config I copied (Open Watcom W32) DOES output file, even though I cannot find it specified anywhere, even in the Advanced Options.
stahta01:
--- Quote from: ta0 on October 10, 2014, 05:35:50 pm ---Thanks for replying, but I think you misunderstand.
The problem is that my copied configuration does not output the directive file before the $link_objects when making the arguments string for wlink.
What is really surprising is that the target config I copied (Open Watcom W32) DOES output file, even though I cannot find it specified anywhere, even in the Advanced Options.
--- End quote ---
Did you check or did you NOT check the advanced compiler options?
Because that is where the problem needs to be fixed.
Tim S.
Navigation
[0] Message Index
[#] Next page
Go to full version