QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
Linker error in Watcom 10.6 compile |
Ref. No. |
QNX.000001190 |
Category(ies) |
Development |
Issue |
A linker error occurs when compiling in QNX4 with Watcom 10.6 . The command lines used are: cc -g -mf -c -o
and
wlink with quiet, qnx, flat, privilege 3, c, debug all
|
Solution |
cc should be used for both compiling and linking. When the Watcom 10.6 package installs it sets up an /etc/default/cc file that has default settings for the linker and compiler. Not only does it save all the typing of those other commands, but it also saves making typing mistakes. The first thing anyone trying to debug this type of error will do is have you compile and link with cc.
Programs are compiled like this so cc can pass all the needed settings on to wcc (or wpp), and wlink. In the above example, the flat memory model was specified twice. Since cc will, by default, compile and link your code you only need to include those arguments once, eliminating another possible source of errors. |
|