William D. Jones
2013-03-01 05:07:03 UTC
Hello all,
Does anyone know whether the Open Watcom POSIX compiler driver functions
correctly for 16-bit targets
For any 16-bit target (dos, qnx), or ANY target that does not use
"wcc386", the owcc program chooses to use "wcc386" instead of the required
compiler (while otherwise setting other options). This leads to a number
of linker errors including missing symbols and attempting to combine
32-bit code with 16-bit libraries. Is this a known bug, incorrect version
or is it possible that I'm not passing in the correct settings?
I can duplicate this error on a simple hello world program with the
following settings. Notice that "wcc386" instead of "wcc" is used:
F:\Projects\sanity>owcc -v -bdos hello.c
Open Watcom C/C++ Compiler Driver Program Version 1.9
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
wcc386 hello.c -bt=dos -fo=.o -fr
Open Watcom C32 Optimizing Compiler Version 1.9
Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
hello.c: 7 lines, included 771, 0 warnings, 0 errors
Code size: 26
wlink @__owcc__.lnk
Open Watcom Linker Version 1.9
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
loading object files
Warning! W1080: file hello.o is a 32-bit object file
searching libraries
Warning! W1008: cannot open clib3r.lib : No such file or directory
Warning! W1008: cannot open math387r.lib : No such file or directory
Warning! W1008: cannot open emu387.lib : No such file or directory
Error! E2028: __CHK is an undefined reference
Error! E2028: printf_ is an undefined reference
Error! E2028: _cstart_ is an undefined reference
Warning! W1014: stack segment not found
Warning! W1023: no starting address found, using 0000:0000
creating a DOS executable
file hello.o(F:\Projects\sanity\hello.c): undefined symbol __CHK
file hello.o(F:\Projects\sanity\hello.c): undefined symbol printf_
Error: Linker returned a bad status
Based on browsing the source code for "owcc.c", I know owcc is reading the
"specs.owc" file because removing it yields a "file not found".
Thanks for your help in advance.
Does anyone know whether the Open Watcom POSIX compiler driver functions
correctly for 16-bit targets
For any 16-bit target (dos, qnx), or ANY target that does not use
"wcc386", the owcc program chooses to use "wcc386" instead of the required
compiler (while otherwise setting other options). This leads to a number
of linker errors including missing symbols and attempting to combine
32-bit code with 16-bit libraries. Is this a known bug, incorrect version
or is it possible that I'm not passing in the correct settings?
I can duplicate this error on a simple hello world program with the
following settings. Notice that "wcc386" instead of "wcc" is used:
F:\Projects\sanity>owcc -v -bdos hello.c
Open Watcom C/C++ Compiler Driver Program Version 1.9
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
wcc386 hello.c -bt=dos -fo=.o -fr
Open Watcom C32 Optimizing Compiler Version 1.9
Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
hello.c: 7 lines, included 771, 0 warnings, 0 errors
Code size: 26
wlink @__owcc__.lnk
Open Watcom Linker Version 1.9
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
loading object files
Warning! W1080: file hello.o is a 32-bit object file
searching libraries
Warning! W1008: cannot open clib3r.lib : No such file or directory
Warning! W1008: cannot open math387r.lib : No such file or directory
Warning! W1008: cannot open emu387.lib : No such file or directory
Error! E2028: __CHK is an undefined reference
Error! E2028: printf_ is an undefined reference
Error! E2028: _cstart_ is an undefined reference
Warning! W1014: stack segment not found
Warning! W1023: no starting address found, using 0000:0000
creating a DOS executable
file hello.o(F:\Projects\sanity\hello.c): undefined symbol __CHK
file hello.o(F:\Projects\sanity\hello.c): undefined symbol printf_
Error: Linker returned a bad status
Based on browsing the source code for "owcc.c", I know owcc is reading the
"specs.owc" file because removing it yields a "file not found".
Thanks for your help in advance.
--
Using Opera's mail client: http://www.opera.com/mail/
Using Opera's mail client: http://www.opera.com/mail/