|
From: | Martin Gerhardy |
Subject: | Re: [Mingw-cross-env-list] Fails to call SDL_InitSubSystem from plugin (Was: State of SDL2 in MXE) |
Date: | Tue, 25 Jun 2013 14:04:02 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 |
Am 25.06.2013 13:38, schrieb Schrober:
as MXE is linking statically, you are loading sdl twice - once the statically linked sdl of your main program, and once the dll. I suppose the linux build was linked dynamically, and not statically. If you would link SDL statically to your main program, you should also get the same error on linux.On Tuesday 25 June 2013 12:58:57 Schrober wrote:Just as info for the developers: This regression was introduced in rev cd5516b9263d - reverting it fixes the problem for me. Attached are both filesHere is the output of some debug patch (attached) on MXE (windows): DDDDDDDDDDDDDDDDDDDDDDebug checking if MainIsReady(1) 004C8720 DDDDDDDDDDDDDDDDDDDDDDebug checking if MainIsReady(1) 004C8720 DDDDDDDDDDDDDDDDDDDDDDebug checking if MainIsReady(0) 652C99A0 The first two are from the main program and the last one is from the plugin loaded by the main program. And on linux it looks like: DDDDDDDDDDDDDDDDDDDDDDebug checking if MainIsReady(1) 0x7f7815241008 DDDDDDDDDDDDDDDDDDDDDDebug checking if MainIsReady(1) 0x7f7815241008 DDDDDDDDDDDDDDDDDDDDDDebug checking if MainIsReady(1) 0x7f7815241008
A possible solution here would e.g. be to only give function pointers to your plugin dll and not linking the dll to SDL at all. I'm of course not sure whether that would work in your particular use case. But linking two times and relying on a shared state might lead to a lot more trouble. The SDL_MainIsReady is only the first visible thing.
Regards Martin
[Prev in Thread] | Current Thread | [Next in Thread] |