該應用程序在10.5機器的OS X 10.6機器上被錯誤地構建。開發人員可以通過考慮三件事情解決這個問題:
otool -l二進制
:
Using the correct compiler parameters:
gcc-4.2 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk ...
Using the correct linker settings (setting environment variable before link command). This is required, so that the OS X 10.6 linker will not use the loader command 'LC_DYLD_INFO_ONLY' (=0x80000022), because OS X 10.5 does not understand this command:
export MACOSX_DEPLOYMENT_TARGET=10.5
(or setenv MACOSX_DEPLOYMENT_TARGET=10.5)
固定在此之後,可以通過運行「otool」檢查應用程序的OS X 10.5正確建立
正確的二進制文件不應包含任何'LC_DYLD_INFO_ONLY'加載命令(僅限'LC_DYLD_INFO'命令)。
(見我的博客文章http://grauonline.de/wordpress/?p=71)
你用手工或通過IDE編譯? – Macmade 2011-04-01 06:30:35
不使用,gcc -m32標誌。 – 2011-04-01 06:36:40