On 12/19/2014 7:35 PM, Joel wrote:
Now I get this:

Joels-MacBook-Pro:dere joelcnz$ ./app
derelict.util.exception.SymbolLoadException@source/derelict/util/exception.d(35):
Failed to load symbol SDL_GameControllerAddMapping from shared library
/usr/local/lib/libSDL2.dylib

OK, it looks like you're actually using a prerelease version of SDL 2. SDL 2.0.0 was released with this function, but several beta versions of SDL 2 were released without it (the game controller mapping API was added a few months before the final 2.0.0 release).

Please uninstall this version of SDL from your system and use one of the release versions.

For future reference, when you see missing symbol errors like this, it almost always means that you are trying to load an older version of the library. You can solve this by doing exactly what I just did -- looking through the repository history of the library in question. That can help you decide which of the three options I outlined in the previous answer is best.

In this case, I used the online mercurial repo browser for SDL 2 [1]. I selected the "release-2.0.0" tag, then clicked "include", then clicked the file link for "SDL_GameController.h". I used Ctrl-f in my web browser to search for SDL_GameControllerAddMapping and found it was there. I then went back to the include directory, clicked "revisions" for the same header and found that the function was added in a commit dated 05 March 2013 [2]. I then looked at the date of the SDL 2.0.0 tag and found it is 11 Aug 2013 [3]. Therefore, if your copy of SDL is missing this file, it is either a prerelease version or it is corrupt, with the former being more likely.

[1] https://hg.libsdl.org/SDL
[2] https://hg.libsdl.org/SDL/rev/c8aa24f05042
[3] https://hg.libsdl.org/SDL/rev/d6a8fa507a45

Reply via email to