[snip]
Failed to load one or more shared libraries:

After that last colon, you should be seeing a list of library names that failed to load. Did you somehow fail to copy/paste it or is it really missing?

Yes, there was something wrong there, here's another go:

Joels-MBP:test joelcnz$ dmd test.d sdl.a util.a
Joels-MBP:test joelcnz$ ./test
derelict.util.exception.SymbolLoadException@derelict/util/exception.d(35): Failed to load symbol SDL_free from shared library /usr/local/lib/libSDL2.dylib
----------------
5 test 0x00000001046a1993 void derelict.util.loader.SharedLibLoader.bindFunc(void**, immutable(char)[], bool) + 127 6 test 0x000000010469d3dc void derelict.sdl2.sdl.DerelictSDL2Loader.loadSymbols() + 312 7 test 0x00000001046a168f void derelict.util.loader.SharedLibLoader.load(immutable(char)[][]) + 123 8 test 0x00000001046a1611 void derelict.util.loader.SharedLibLoader.load(immutable(char)[]) + 269 9 test 0x00000001046a14fe void derelict.util.loader.SharedLibLoader.load() + 98 10 test 0x000000010469cec5 _Dmain + 21 11 test 0x00000001046b8a64 D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv + 40 12 test 0x00000001046b89a9 void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) + 45 13 test 0x00000001046b8a09 void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() + 45 14 test 0x00000001046b89a9 void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) + 45 15 test 0x00000001046b8925 _d_run_main + 433 16 test 0x000000010469cee4 main + 20 17 libdyld.dylib 0x00007fff8ac6f5c9 start + 1
18  ???                                 0x0000000000000001 0x0 + 1
Joels-MBP:test joelcnz$

You can see the names that Derelict searches for by default on Mac at [1]. Make sure that your copy of SDL is installed at one of those locations. Otherwise, you can pass the path to your installed copy to an overload of the load method:

DerelictSDL2.load( ["Path/to/your/SDL2/installation.framework/dylib"] );

I didn't put install with SDL2, libSDL2.dylib was in a different place than were I copied SDL2 (old installation?). And I couldn't get that to work either.

[1] https://github.com/DerelictOrg/DerelictSDL2/blob/master/source/derelict/sdl2/sdl.d#L42

Reply via email to