0

我已经下载了 wunder 广播项目,我已经在我的工作区中复制了 MMS 项目。如果我尝试使用 mms_connect Xcode4 给我这个错误:

ld /Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator/test1.app/test1 normal i386 cd /Users/Alex/Source/test1 setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer /Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/Alex/ Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator -F/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator -filelist /Users/ Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Intermediates/test1.build/Debug-iphonesimulator/test1.build/Objects-normal/i386/test1.LinkFileList -mmacosx-version-min=10.6 -Xlinker - objc_abi_version -Xlinker 2 -lz。1 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator/test1.app/test1

架构 i386 的未定义符号:“_mms_connect”,引用自:test1AppDelegate.o 中的 -[test1AppDelegate application:didFinishLaunchingWithOptions:] ld:未找到架构 i386 collect2 的符号:ld 返回 1 个退出状态

有什么解决办法吗?

4

1 回答 1

0

链接器似乎无法链接到 libmms,因为它的架构错误。您正在构建的项目似乎适用于 iPhone 模拟器。由于模拟器在您的计算机上运行,​​因此它的体系结构是 i386(或者可能是 x86_64,具体取决于您使用的机器)。所以基本上你正在使用 i386 进行编译,但是当链接器尝试链接到 libmms 时,它没有发现 libmms 是使用相同的体系结构编译的。

由于 iOS 设备使用 armv6 或 armv7 架构,而模拟器使用 i386,因此很难在为实际设备构建或为模拟器构建之间来回切换,因为需要为所有 3 种架构构建任何外部静态库。

您可能需要使用 i386 架构重建 libmms。

于 2011-10-01T11:42:13.853 回答