Derelict SDL segfaulting on ubuntu?

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Mar 22 05:20:27 PDT 2017


On Wednesday, 22 March 2017 at 10:32:44 UTC, Robly18 wrote:

>
> Well, I have a call to SDL_GetVersion in my code, to check 
> exactly what you're saying. And it spits out "2.0.5", so I 
> don't think that is the problem. I believe I do have it 
> installed: I rm'd the old lib files and used make install on 
> SDL. Same thing for SDL_Image.

OK. If it says 2.0.5, then you do have it installed. And I'm out 
of ideas until I try it out myself.

>
> I'm also not sure, how can I tell if a function is from SDL 
> 2.0.5 or 2.0.4? I tried to look up the changelogs, but couldn't 
> find anything compact enough that I can look through it, yet 
> that would tell me what functions are new.

Some of the functions listed on the SDL Wiki, like this one [1], 
have at the bottom of the page the version they were added. But 
it's easier to look at the source for DerelictSDL2. In order to 
support the SharedLibVersion, the loader implements functions 
like this one:

```
private ShouldThrow allowSDL_2_0_0(string symbolName) {
       switch(symbolName) {
             // Functions added in 2.0.1
             case "SDL_free": break;
             case "SDL_SetAssertionHandler": break;
             case "SDL_GetAssertionReport": break;
             case "SDL_ResetAssertionReport": break;
             case "SDL_GetSystemRAM": break;
             case "SDL_UpdateYUVTexture": break;
             case "SDL_GL_GetDrawableSize": break;
             case "SDL_GetBasePath": break;
             case "SDL_GetPrefPath": break;
             default: return allowSDL_2_0_1(symbolName);
       }
       return ShouldThrow.No;
}
```

So you can look starting from [2] to see all of the functions 
added in 2.0.1 and higher.



[1] 
http://wiki.libsdl.org/SDL_GetWindowBordersSize?highlight=%28%5CbCategoryVideo%5Cb%29%7C%28CategoryEnum%29%7C%28CategoryStruct%29
[2] 
https://github.com/DerelictOrg/DerelictSDL2/blob/master/source/derelict/sdl2/sdl.d#L566



More information about the Digitalmars-d-learn mailing list