0

我正在构建一个集成了 Three20 的 iOS 应用程序。即使在模拟器或 iDevices 上,我的应用程序也运行良好。但是,当我尝试构建一个 Ad-hoc 以发送给我的客户进行测试时。我遇到了一个非常奇怪的错误

ld /Users/kulnova/Library/Developer/Xcode/DerivedData/AppFantator-etlvrvoqzixizqbdblqhgefckwbb/ArchiveIntermediates/AppFantator/IntermediateBuildFilesPath/AppFantator.build/Adhoc-iphoneos/AppFantator.build/Objects-normal/armv6/Fantator normal armv6 cd /Users/kulnova /Desktop/AppFantator setenv IPHONEOS_DEPLOYMENT_TARGET 4.0 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr /local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -动态库 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3。sdk -L/Users/kulnova/Library/Developer/Xcode/DerivedData/AppFantator-etlvrvoqzixizqbdblqhgefckwbb/ArchiveIntermediates/AppFantator/BuildProductsPath/Adhoc-iphoneos -L/Users/kulnova/Desktop/AppFantator -F/Users/kulnova/Library/Developer/ Xcode/DerivedData/AppFantator-etlvrvoqzixizqbdblqhgefckwbb/ArchiveIntermediates/AppFantator/BuildProductsPath/Adhoc-iphoneos-filelist/Users/kulnova/Library/Developer/Xcode/DerivedData/AppFantator-etlvrvoqzixizqbdblqhgefckwbb/ArchiveIntermediates/AppFantator/IntermediateBuild-iphonebuild/F AppFantator.build/Objects-normal/armv6/Fantator.LinkFileList -nostdlib -dead_strip -ObjC -all_load -miphoneos-version-min=4。0 -framework QuartzCore -lThree20 -lThree20Core -lThree20Network -lThree20Style -lThree20UI -lThree20UICommon -lThree20UINavigator -framework Foundation -framework UIKit -framework CoreGraphics -framework SystemConfiguration -framework Security -framework MessageUI -o /Users/kulnova/Library/Developer/Xcode/DerivedData /AppFantator-etlvrvoqzixizqbdblqhgefckwbb/ArchiveIntermediates/AppFantator/IntermediateBuildFilesPath/AppFantator.build/Adhoc-iphoneos/AppFantator.build/Objects-normal/armv6/Fantator

ld:找不到-lThree20 collect2的库:ld返回1退出状态命令/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2失败,退出代码为1

该错误显示为Apple Match-O Linker Error

我很确定我已经严格按照手动流程将 Three20 集成到源代码中。“-ObjC”和“-all_load”都添加到链接器中。

我不知道你们中是否有人遇到同样的问题,你们有什么线索可以解决这个问题吗?

非常感谢您的阅读和支持。

4

2 回答 2

0

这可能是因为您需要将three20 添加到您的临时目标。尝试使用目标名称再次运行 python 脚本:

python three20/src/scripts/ttmodule.py -p ProjectName/ProjectName.xcodeproj -c Adhoc Three20

如果您的临时目标中已经存在构建搜索标头,请尝试在您的目标设置中引用构建路径。如果您的目标名称中有空格,xcode 可能会在将three20 构建到构建文件夹中时遇到问题。

"$(BUILT_PRODUCTS_DIR)/../three20"
"$(BUILT_PRODUCTS_DIR)/../../three20"
"../../libs/external/three20/Build/Products/three20"
于 2011-06-28T16:23:57.393 回答
-1

我想自己提供一个解决方案。这有点抽象,但我所做的是回到起点(就在我将 Three20 Lib 的第一件事添加到我的应用程序之前,我只是从我的 Git 中恢复过来)。

之前出现过这个错误,我没有注意到我的链接框架是红色的(我以为会有问题,但不知道为什么)。

问了一圈,没有解决。我一次又一次地尝试做这个过程,最后,我所有的框架现在都是黑色的,不再是红色。一切都很顺利!我让 Adhoc 分发给我的客户。(我试图在这里发布截图,但我不允许,因为我是新用户)

如果你也遇到同样的情况,不知道怎么解决。我强烈建议你一次又一次地这样做,直到你遇到同样的情况。

于 2011-06-29T08:05:24.500 回答