[SDL] SDL-1.2 RWOps under Win32 (VS 8) is it working or ???
William Petiot [exoide]
william at exoide.com
Wed Mar 22 13:30:25 PST 2006
I think SDL_RWFromFP(file, 0); is not fully safe on Win32 at least.
It depends on :
- the compilation model (for MSVCRT - multithreaded dll ? or LIBCMT.LIB : static lib c multithreaded, or LIBC.LIB : static lib C monothread etc) of your own project.
- the compilation model of the SDL.dll
You have to use exactly the same libC than the SDL.DLL for this function to work properly.
the argument FILE *file is simply passed from your code to the dll, and then to the "libc" version of the dll, but it has been created in your code, with your own version of "libc". If they are not the same, this will not work correctly.
You could do SDL_RWFromFile(const char *filename, etc); instead of opening the file yourself, this would hopefully work.
or , open the file yourself, load it in memory (or map it to memory) and then SDL_RWFromMem() on a pointer to data loaded (or mapped).
Asmodehn Shade a écrit :
> Hi,
>
> I am running into some problems trying to make RWOps work in my own
> project...
> So I tried to run a basic tutorial only using SDL and not my stuff.
>
> I got some problems trying to run this :
> http://www.kekkai.org/roger/sdl/rwops/rwtut1.c
> It just fails during the SDL_LoadBMP_RW but down in some windows dlls....
>
> I tried with both the release SDL 1.2.9 and the last SDL-1.2 CVS
> snapshot... using VS Express 8 (2005)
>
> I was wondering if someone already experienced the same thing, and if
> someone might have some clues...
> Or maybe there is something I am doing that I shouldnt ??
> In which version of SDL are the RWOps known to be fully working or not
> on win32 ??
>
> Thanks for your help,
>
> Cheers,
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
More information about the SDL
mailing list