Implementing SDL on MacOS
I have developed an app using SDL2 installed via brew. It works fine in my development environment, but when trying to run it on another computer, I have the following error:
Drivers count: 2
Driver name: opengl
Driver name: software
Initialize all SDL subsystems
Set up the window
exists true
failed to load "/Users/joker/Desktop/SDLTest.app/Contents/MacOS/look.png"
Failed loading libpng.dylib: dlopen(libpng.dylib, 6): image not found
Here's my output as I type otool -L SDLTest.app/Contents/MacOS/SDLTest
:
SDLTest.app/Contents/MacOS/SDLTest:
@executable_path/../Frameworks/libSDL2-2.0.0.dylib (compatibility version 3.0.0, current version 3.1.0)
@executable_path/../Frameworks/libSDL2_image-2.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../Frameworks/libSDL2_ttf-2.0.0.dylib (compatibility version 11.0.0, current version 11.2.0)
@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.3.0, current version 5.3.1)
@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.0, current version 5.3.1)
@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.0, current version 5.3.1)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
Here's my output as I type otool -L SDLTest.app/Frameworks/libSDL2_image-2.0.0.dylib
:
SDLTest.app/Contents/Frameworks/libSDL2_image-2.0.0.dylib:
@executable_path/../Frameworks/libSDL2_image-2.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../Frameworks/libSDL2-2.0.0.dylib (compatibility version 3.0.0, current version 3.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
Here are the contents of my folder SDLTest.app/Contents/Frameworks
:
total 3064
drwxr-xr-x 14 martin staff 476B 27 oct 15:11 .
drwxr-xr-x 7 martin staff 238B 27 oct 15:11 ..
drwxr-xr-x 4 martin staff 136B 27 oct 15:11 QtCore.framework
drwxr-xr-x 4 martin staff 136B 27 oct 15:11 QtGui.framework
drwxr-xr-x 4 martin staff 136B 27 oct 15:11 QtPrintSupport.framework
drwxr-xr-x 4 martin staff 136B 27 oct 15:11 QtWidgets.framework
drwxr-xr-x 6 martin staff 204B 27 oct 15:11 SDL2.framework
drwxr-xr-x 7 martin staff 238B 27 oct 15:11 SDL2_image.framework
drwxr-xr-x 7 martin staff 238B 27 oct 15:11 SDL2_ttf.framework
-rw-r--r-- 1 martin staff 755K 27 oct 15:11 libSDL2-2.0.0.dylib
-rw-r--r-- 1 martin staff 78K 27 oct 15:11 libSDL2_image-2.0.0.dylib
-rw-r--r-- 1 martin staff 33K 27 oct 15:11 libSDL2_ttf-2.0.0.dylib
-rw-r--r-- 1 martin staff 491K 27 oct 15:11 libfreetype.6.dylib
-rw-r--r-- 1 martin staff 164K 27 oct 15:11 libpng16.16.dylib
+3
source to share
No one has answered this question yet
Check out similar questions: