【发布时间】:2010-08-14 15:46:11
【问题描述】:
我有一台 OS X 10.6 Mac 作为我的开发机器。我编写的程序在开发机器上完美运行。但是,当我尝试在 OS X 10.5(不确定是否相关)测试机器上运行它时,它在启动时崩溃。
这是我得到的错误:
Process: MyApp[25908]
Path: /Applications/MyApp.app/Contents/MacOS/MyApp
Identifier: MyApp
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: launchd [109]
Interval Since Last Report: 17392106 sec
Crashes Since Last Report: 735
Per-App Interval Since Last Report: 0 sec
Per-App Crashes Since Last Report: 8
Date/Time: 2010-08-14 07:50:09.768 -0700
OS Version: Mac OS X 10.5.8 (9L31a)
Report Version: 6
Anonymous UUID: 1BF30470-ACF2-46C7-B6D5-4514380965C8
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0
Dyld Error Message:
Symbol not found: __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_i
Referenced from: /Applications/MyApp.app/Contents/MacOS/MyApp
Expected in: /usr/lib/libstdc++.6.dylib
所以看起来它正在崩溃,因为它正在加载动态库 libstdc++.6 的不兼容版本。这种东西普通吗?在 Google 上搜索并没有真正发现许多其他存在此问题的程序。我应该在编译中做什么来防止这种情况发生?我是否需要以某种方式将 libstdc++ 包含在我的应用程序包中?
【问题讨论】: