[SDL] dinamically linking problem

Emanuele Dalmasso emanuele.dalmasso at libero.it
Mon May 17 23:58:21 PDT 2004


Hi, thanks for reply

   Tue May 4 11:11:27 2004  Damien A Wrote:

> Make sure that your function pointers agree with the
> SDL prototypes.   GetError returns a character
> pointer, not an integer.  Also, SDL libraries use the

Yes, well, it was only a first try to make it work

> C calling convention, not the Win32 call convention. 
> So, replace your CALLBACK, with SDLCALL (or nothing:

Mmh, can it work? if I load the library dinamically, the definition of SDLCALL is not still knowen during the linking fase. I've to try it.

> c.f begin_code.h).  Taking a look at SDL_main.h. It
> shows that when using SDL under WinMain (which you
> might have to do), you should call

I have to use the winMain() instead of using the main? 
One reason I would like to use SDL is to write code in standard way!

> SDL_SetModuleHandle().  I think it has something to do
> with DirectInput, but I can't remember. Everything
> should work out fine. Go to
> http://www.function-pointer.org/ for more info on
> dealing with function pointers.

Uhmm, if I have to rewrite all declaration of function to make it work, I think I have to rewrite all of them for every single different OS, and if I have to use winmain (instead main) then I think I have to use all the specifically version for every single OS.
I would like to use sdl to have to use only one code for every OS.
In this case I think I'll go to write code with normal windows function!!







More information about the SDL mailing list