Watcom

Is there anyone who succeeded to use SDL with Watcom compiler (Win32)?
I’ve been trying to use Visual C binaries (Watcom is quite compatible with M$ VC), but with one
exception: underscore is given at the end instead of beginning of symbol name.

Or maybe someone tried to compile SDL under Watcom?

Thanks in advance.

Been years since I used watcom, but… The underscore at the end is used
with watcom’s register passing convention, so you might try using different
argument passing options

At 03:17 PM 11/29/2000 -0800, you wrote:>Is there anyone who succeeded to use SDL with Watcom compiler (Win32)?

I’ve been trying to use Visual C binaries (Watcom is quite compatible with
M$ VC), but with one
exception: underscore is given at the end instead of beginning of symbol name.

Or maybe someone tried to compile SDL under Watcom?

Thanks in advance.

Is there anyone who succeeded to use SDL with Watcom compiler (Win32)?
I’ve been trying to use Visual C binaries (Watcom is quite compatible with M$ VC), but with one
exception: underscore is given at the end instead of beginning of symbol name.

I’m compiling the windows version of ASC ( www.asc-hq.org ) with
Watcom, no problems there. You just need to get some compiler settings
right:
Here are the options which I remember where of relevants to SDL:
force enums to be type int
Stack based calling

You probably use register based calling, which will cause linking
problems.

Or maybe someone tried to compile SDL under Watcom?

I tried, but gave up…

Bye,
MartinOn Wed, 29 Nov 2000 15:17:16 -0800, heretyk at pingwin.icm.edu.pl wrote:

I grabbed a copy of Watcom C++ 10.6 from work, and was able to build
the SDL library, but I wasn’t able to link any test program with it,
I got “XXX is an undefined reference” for all of the SDL functions.

I’m using stack based passing, and I’m including the SDL.lib file as
though it were a source file. I’ve also played with the linking options
to no avail.

I get the same messages when I drop in the Visual C++ archives.

Suggestions?

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Sam Lantinga wrote:

I grabbed a copy of Watcom C++ 10.6 from work, and was able to build
the SDL library, but I wasn’t able to link any test program with it,
I got “XXX is an undefined reference” for all of the SDL functions.

I’m using stack based passing, and I’m including the SDL.lib file as
though it were a source file. I’ve also played with the linking options
to no avail.

Watcom’s linker is weird. It’s an ld-wannabe that somehow ended up in a
Windows/DOS compiler. One of the more powerful linkers out there,
though.
One possible problem is that it uses trailing underscores instead of
leading underscores for symbol names, which often makes linking foreign
and native code a problem. I don’t know specifically how that would
affect your case.
Are you compiling the test program in Watcom also, or trying to link a
precompiled Visual C++ example in? If everything’s done in Watcom I
don’t see why there’d be a problem.

-John–
Underfull \account (badness 10000) has occurred while \spend is active
John R. Hall - Student, Georgia Tech - Contractor, Loki Software

One possible problem is that it uses trailing underscores instead of
leading underscores for symbol names, which often makes linking foreign
and native code a problem. I don’t know specifically how that would
affect your case.

The trailing underscores indicates register based parameter passing,
which I have turned off.

Are you compiling the test program in Watcom also, or trying to link a
precompiled Visual C++ example in? If everything’s done in Watcom I
don’t see why there’d be a problem.

Yeah, everything is built with Watcom, which is why I don’t understand
what’s going on. Help is appreciated. :slight_smile:

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Sam Lantinga wrote:

One possible problem is that it uses trailing underscores instead of
leading underscores for symbol names, which often makes linking foreign
and native code a problem. I don’t know specifically how that would
affect your case.

The trailing underscores indicates register based parameter passing,
which I have turned off.

Are you compiling the test program in Watcom also, or trying to link a
precompiled Visual C++ example in? If everything’s done in Watcom I
don’t see why there’d be a problem.

Yeah, everything is built with Watcom, which is why I don’t understand
what’s going on. Help is appreciated. :slight_smile:

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Maybe its time to breakout the disassmbler? objdump?

    -- David Snopek

Sam Lantinga wrote:

I grabbed a copy of Watcom C++ 10.6 from work, and was able to build
the SDL library, but I wasn’t able to link any test program with it,
I got “XXX is an undefined reference” for all of the SDL functions.

I’m using stack based passing, and I’m including the SDL.lib file as
though it were a source file. I’ve also played with the linking options
to no avail.

Watcom’s linker is weird. It’s an ld-wannabe that somehow ended up in a
Windows/DOS compiler. One of the more powerful linkers out there,
though.
[clip]

hrm, fwiw a VERY long time ago Watcom -was- a Unix compiling toolkit.
Should explain a few things. (well, sorta :slight_smile:
It was the first 32bit compiler for DOS though :slight_smile:
dinna know where the description of it’s history was though other than
it’s from University of Waterloo, Ontario originally.

but yes, trailing underscores and default parameters are register rather
than stack. Floating point is different as well although they worked hard
for M$ compatibility. C++ naming convention is entirely incompatible
though.

But don’t ask me :slight_smile: I haven’t used Watcom C++ since 1995…

G’day, eh? :slight_smile:
- TeunisOn Sun, 3 Dec 2000, John R. Hall wrote: