_SDL_RWseek OSX Xcode9 dyld: lazy symbol binding failed: Symbol not found

I am trying to compile on OSX 10.13 this “ready to go” project https://github.com/mortennobel/SimpleRenderEngineProject , which quite reasonably suggests to fetch the “official” SDL binaries and paste them in system directories, which I did.Then the “big” target, a binary called SRE-Gui, informs me SDL2_Image cannot find SDL_RWseek in SDL2. I had a look with the nm command and indeed no such thing exists in SDL2, nor does it exist in the binaries installed in /usr/local with brew.

I am a newcomer to SDL so I am hitting a wall here, is there some naughty mismatch in the official binaries for Image and SDL, or something completely different? Perhaps building from source should be the default? I know the project I am compiling has some imperfections, but can’t see how my project would mess up the symbols.


I believe SDL_RWseek() is a macro. If for some reason the macro isn’t being defined (which presumably means you’re missing a header file) you could call the function via its pointer in the SDL_RWops structure.

Right, but this is one official SDL binary “calling” another, to my untrained eye looks like something may have been left out in the current version offered for download. FYI that project compiles OK in Windows because, I believe, no downloading of official binaries is involved, not sure what versions or patches are in the source tree though. Anyway, like I said my CMake files remain imperfect, I may get a clearer picture in the coming days.

PS Apparently the “built in” that works is SDL2_image-2.0.4, not sure yet if 2.0.5 has a bug or not

FWIW I ran the project through the debugger, and inserted

#include <SDL_rwops.h>

in all the source files that seemed implicated, the error did not go away. Internet searches mostly suggest 2 things, either some binary changes/problems or Mac system protection SIP, the latter for libraries under /usr

This is possibly https://bugzilla.libsdl.org/show_bug.cgi?id=4526

If you built your apps and/or libs against the not-yet-released 2.0.10,
but your SDL2 framework <= 2.0.9, this is what’s going to happen.