Götz Hoffart
2013-12-01 21:54:18 UTC
Hi,
having worked a long time with Turbo C in the past, I'm having problems
with compiling and linking a simple C program, only some arithmetics and
a single prinf(). I'm using it on Debian GNU/Linux on a x86_64 machine.
Installation target is /opt/watcom, I invoke ". /opt/watcom/owsetenv.sh"
before compiling.
$ wcc386 -onatx -oh -ei -zp8 -6 -fp6 -bt=linux collatz.c
Open Watcom C32 Optimizing Compiler Version 1.9
[…]
collatz.c: 27 lines, included 712, 0 warnings, 0 errors
Code size: 67
-> all fine, I get 'collatz.o' as output. Good. Now I try to link it:
$ wlink FILE collatz.o FORMAT ELF NAME collatz
[…]
loading object files
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: printf_ is an undefined reference
Error! E2028: _cstart_ is an undefined reference
Warning! W1023: no starting address found, using 00000000
creating an ELF executable
file collatz.o(/home/goetz/src/collatz.c): undefined symbol printf_
Obviously watcom can't find the libraries. But owsetenv.sh should set
the right path environment, shouldn't it? What's wrong?
Thanks in advance,
Götz
having worked a long time with Turbo C in the past, I'm having problems
with compiling and linking a simple C program, only some arithmetics and
a single prinf(). I'm using it on Debian GNU/Linux on a x86_64 machine.
Installation target is /opt/watcom, I invoke ". /opt/watcom/owsetenv.sh"
before compiling.
$ wcc386 -onatx -oh -ei -zp8 -6 -fp6 -bt=linux collatz.c
Open Watcom C32 Optimizing Compiler Version 1.9
[…]
collatz.c: 27 lines, included 712, 0 warnings, 0 errors
Code size: 67
-> all fine, I get 'collatz.o' as output. Good. Now I try to link it:
$ wlink FILE collatz.o FORMAT ELF NAME collatz
[…]
loading object files
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: printf_ is an undefined reference
Error! E2028: _cstart_ is an undefined reference
Warning! W1023: no starting address found, using 00000000
creating an ELF executable
file collatz.o(/home/goetz/src/collatz.c): undefined symbol printf_
Obviously watcom can't find the libraries. But owsetenv.sh should set
the right path environment, shouldn't it? What's wrong?
Thanks in advance,
Götz