SDL + Watcom C/C++ : doesn't run

I’m trying to use SDL with Watcom C/C++ 11.0b . I’m using the packaged
SDL 1.1.2 DLL and source from the SDL website, because I haven’t
succeed in building the SDL.DLL with Watcom yet.

I can compile and link programs without problems (after a small
modification to SDL), but they don’t run.

Under Win98 SDL_RegisterApp fails when it is called in console_main .
When using NT4 this works fine, but then SDL_SetVideoMode fails with
"Couldn’t set 800x600x8 video mode: Couldn’t create DIB section"

This happens with testsprite as well as with my own program, Advanced
Strategic Command.

What’s going wrong there? Everything happens inside SDL.DLL , so I
don’t know how Watcom could affect this.

The only modification I did is in begin_code.h . I replaced
#define DECLSPEC __declspec(dllexport)
by
#define DECLSPEC __declspec(__pascal)
to be able to link against SDL.DLL

Bye,
Martin

I Can make my program run compiling with Watcom C.

I try to compile the Dll and I Fail, so I use the Dll.

I Don’t modify the include. The only thing I do is compile with this option:
-d_DEBUG -dWIN32 -dWINDOWS -dENABLE_WINDIB -dENABLE_DIRECTX
-d_WIN32_WINNT=0x0400
-dMSC_VER=1000 -3s -bt=NT -zw -hw -s -bm -bg -d2

All this option came from the time when i try to compile the Dll myself with
WC so some define may be not necessary.

Daniele Forghieri

What Watcom C compiler version are you using?

KovacsOn Fri, 2 Jun 2000, Forghieri Daniele wrote:

I Can make my program run compiling with Watcom C.

I try to compile the Dll and I Fail, so I use the Dll.

I Don’t modify the include. The only thing I do is compile with this option:
-d_DEBUG -dWIN32 -dWINDOWS -dENABLE_WINDIB -dENABLE_DIRECTX
-d_WIN32_WINNT=0x0400
-dMSC_VER=1000 -3s -bt=NT -zw -hw -s -bm -bg -d2

All this option came from the time when i try to compile the Dll myself with
WC so some define may be not necessary.

Daniele Forghieri