SDL App won't open unless Framework is installed in /Library/Frameworks

431 views Asked by At

I have built a very simple app with Xcode 3.1.4 on OSX 10.8.

It starts in 10.8 if I have SDL.Framework installed in /Library/Frameworks/SDL.framework. (SDL 1.2.15 from the SDL site.)

I also tried it in another Mac, with OSX 10.9. It doesn't work there either, with the same error message:

Process:         SDLOpenGLIntro [591]
Path:            /Volumes/*/SDLOpenGLIntro.app/Contents/MacOS/SDLOpenGLIntro
Identifier:      com.yourcompany.SDLOpenGLIntro
Version:         ???
Code Type:       X86 (Native)
Parent Process:  launchd [255]
Responsible:     SDLOpenGLIntro [591]
User ID:         501

Date/Time:       2014-10-22 19:40:49.818 +0200
OS Version:      Mac OS X 10.9.5 (13F34)
Report Version:  11
Anonymous UUID:  D0DA6FFA-AC63-8F0E-4FE5-B907EEFA8638


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: /Volumes/*/SDLOpenGLIntro.app/Contents/MacOS/SDLOpenGLIntro
  Reason: image not found

Binary Images:
0x8fe81000 - 0x8feb3417  dyld (239.4) <0F2176BD-4239-3506-BA41-3B885269520E> /usr/lib/dyld

Model: MacBookPro9,2, BootROM MBP91.00D3.B08, 2 processors, Intel Core i5, 2.5 GHz, 4 GB, SMC 2.2f44
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80CE, 0x4D34373142353737334448302D434B302020
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80CE, 0x4D34373142353737334448302D434B302020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xF5), Broadcom BCM43xx 1.0 (5.106.98.100.22)
Bluetooth: Version 4.2.7f3 14616, 3 services, 15 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: ST1000LM014-1EJ164, 1 TB
Serial ATA Device: OPTIARC DVD RW AD-5970H
USB Device: Hub
USB Device: FaceTime HD Camera (Built-in)
USB Device: Hub
USB Device: Hub
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: IR Receiver
Thunderbolt Bus: MacBook Pro, Apple Inc., 25.1

I have tried to find an answer on Stack Overflow and other sites, but can't make any suggestion so far work.

I have tried for instance to run this script after the app is created:

#!/bin/sh

APP="${1?}"

echo "Copying SDL"
cp -r "/Library/Frameworks/SDL.framework" "${APP}/Contents/Frameworks/"

echo "Changing package identification of SDL"
install_name_tool -id \
        @rpath/../Frameworks/SDL.framework/SDL \
        "${APP}/Contents/Frameworks/SDL.framework/SDL"
0

There are 0 answers