linking gcc libs with Watcom compiler

Hi,
I have been given the task of adding some capabilities to our product,
and have a few questions. The new features we are adding require gcc to
compile them. I got a copy of gcc for QNX4 (from Jean-Claude Michot’s
site), compiled the library, and now I’m working on linking it in. I read
that one can link a gcc-compiled library with watcom by using the “-#s
option (where # is 3, 4, or 5). This helped, but I still have a problem.

I’m using more than one library with my application, one was compiled
with watcom, the other with gcc. If I supply the option, I get undefined
references for functions in the watcom-compiled library. If I leave the
option out, I get undefined references for functions in the gcc-compiled
library. What I’m wondering is, is there a way to get them both to link
correctly, or am I basically stuck?

TIA,
Ron

Can you compile everything with gcc?

Either that or build a custom library with only the modules you need from
each library.

Be aware that there can not be a XYZ() with register calling AND an XZY()
with stack calling.

“Ron Cococcia” <ron.nospam@request.nospam.com> wrote in message
news:ansrgu$rkh$1@inn.qnx.com

Hi,
I have been given the task of adding some capabilities to our product,
and have a few questions. The new features we are adding require gcc to
compile them. I got a copy of gcc for QNX4 (from Jean-Claude Michot’s
site), compiled the library, and now I’m working on linking it in. I read
that one can link a gcc-compiled library with watcom by using the “-#s
option (where # is 3, 4, or 5). This helped, but I still have a problem.

I’m using more than one library with my application, one was compiled
with watcom, the other with gcc. If I supply the option, I get undefined
references for functions in the watcom-compiled library. If I leave the
option out, I get undefined references for functions in the gcc-compiled
library. What I’m wondering is, is there a way to get them both to link
correctly, or am I basically stuck?

TIA,
Ron