Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Library not loaded: @rpath/SDL.framework/Versions/A/SDL on mac 10.9

Tags:

xcode

macos

sdl

I have a library project built with xcode3.2.6. It works fine until I tried it on one of the mac 10.9 machine.

The library uses sdl framework.

When I tried my library, I got error message:

 Date/Time: 2014-07-02 11:36:04.493 -0400
 OS Version: Mac OS X 10.9.4 (13E28)
 Report Version: 11
 Anonymous UUID: AD396161-ACA4-007D-DB07-036ED3718A4A

 Crashed Thread: 0

 Exception Type: EXC_BREAKPOINT (SIGTRAP)
 Exception Codes: 0x0000000000000002, 0x0000000000000000

 Application Specific Information:
 dyld: launch, loading dependent libraries

 Dyld Error Message:
 Library not loaded: @rpath/SDL.framework/Versions/A/SDL
 Referenced from: /Applications/Eyelink/*/gcwindow.app/Contents/MacOS/gcwindow
 Reason: no suitable image found. Did find:
 /Library/Frameworks/SDL.framework/Versions/A/SDL: no matching architecture in universal   wrapper

 Binary Images:
 0x7fff62313000 - 0x7fff62346817 dyld (239.4) <042C4CED-6FB2-3B1C-948B-CAF2EE3B9F7A>  /usr/lib/dyld
 0x7fff915b8000 - 0x7fff915b8fff com.apple.Cocoa (6.8 - 20) <E90E99D7-A425-3301-A025-D9E0CD11918E> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa

I guess the error is related with rpath, but have no idea where I should start debugging it. Please help. Thanks.

By the way, the SDL version is 1.2.14, include both 32bit and 64bit versions.

The mac is 10.9.4, 64bit.

like image 587
user1558064 Avatar asked Sep 04 '25 04:09

user1558064


1 Answers

For anyone finding this in 2020, make sure to install SDL2 correctly for your target system:

https://www.libsdl.org/

In regard to Mac OS X: /Library/Frameworks/ should contain SDL2.framework.

like image 54
Robert Brisita Avatar answered Sep 06 '25 23:09

Robert Brisita