我在 OSX 10.8 上使用 Xcode 3.1.4 构建了一个非常简单的应用程序。
如果我将 SDL.Framework 安装在/Library/Frameworks/SDL.framework
. (来自 SDL 站点的 SDL 1.2.15。)
我还在另一台装有 OSX 10.9 的 Mac 上进行了尝试。它在那里也不起作用,并带有相同的错误消息:
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
我试图在 Stack Overflow 和其他网站上找到答案,但到目前为止无法提出任何建议。
例如,我尝试在创建应用程序后运行此脚本:
#!/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"