How to Compile old source using Watcom C 10.6?

I have encountered problems while compiling C source code (developed using
Watcom 8.5e) with the help of Watcom C 10.6. Does anyone know how to compile
old source code using Watcom C10.6 ?

Thanks,
Krupa

Krupa <seto@vsnl.com> wrote:

I have encountered problems while compiling C source code (developed using
Watcom 8.5e) with the help of Watcom C 10.6. Does anyone know how to compile
old source code using Watcom C10.6 ?

What problem? There are some functions that changed names, went away,
or had parameters change order/value.

I know this occurs around some of the Posix routines, but there could
be other issues.

Another issue, is one of 16 vs 32 bit compiles. I think with 8.5,
the default was to build 16bit applications, while with 10.6, the
default is to build 32bit applications. (In fact, I’m not sure if
8.5 even supported building 32 bit apps, but its been a while.)
Are you trying to build for 16 or 32 bit? Assumptions about the
length of an int could break things.

If you want to build 16 bit, try adding “-2 -ml” to all your cc
command lines.

e.g.
cc -c -2 -ml blah.c
cc -2 -ml blah.o -o blah

If your build commands were for 16-bit large programs, and you just
compiled as:

cc -ml blah.c -o blah

Or equivalent, you will now be trying to build 32-bit large model
programs, and this will NOT work. (32-bit large model will create
48-bit pointers, and we have no libraries to support this model.)

You may just want to remove the -ml from your command lines if this
is your problem.

If none of this helps. some information about what sort of errors you
are seeing would help, rather than just me shooting in the target at
some of the likely problems.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Thanks David,
We could resolve the problem by adding “-2 -ml” to cc command line…
Regards,
Krupa

David Gibbs <dagibbs@qnx.com> wrote in message
news:ad08om$8uo$2@nntp.qnx.com

Krupa <> seto@vsnl.com> > wrote:
I have encountered problems while compiling C source code (developed
using
Watcom 8.5e) with the help of Watcom C 10.6. Does anyone know how to
compile
old source code using Watcom C10.6 ?

What problem? There are some functions that changed names, went away,
or had parameters change order/value.

I know this occurs around some of the Posix routines, but there could
be other issues.

Another issue, is one of 16 vs 32 bit compiles. I think with 8.5,
the default was to build 16bit applications, while with 10.6, the
default is to build 32bit applications. (In fact, I’m not sure if
8.5 even supported building 32 bit apps, but its been a while.)
Are you trying to build for 16 or 32 bit? Assumptions about the
length of an int could break things.

If you want to build 16 bit, try adding “-2 -ml” to all your cc
command lines.

e.g.
cc -c -2 -ml blah.c
cc -2 -ml blah.o -o blah

If your build commands were for 16-bit large programs, and you just
compiled as:

cc -ml blah.c -o blah

Or equivalent, you will now be trying to build 32-bit large model
programs, and this will NOT work. (32-bit large model will create
48-bit pointers, and we have no libraries to support this model.)

You may just want to remove the -ml from your command lines if this
is your problem.

If none of this helps. some information about what sort of errors you
are seeing would help, rather than just me shooting in the target at
some of the likely problems.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Krupa <seto@vsnl.com> wrote:

Thanks David,

You’re welcome.

We could resolve the problem by adding “-2 -ml” to cc command line…

Great.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.