用于iOS Mach-O链接器错误的libpd

时间:2014-03-19 06:49:26

标签: ios xcode puredata libpd

我在通用iOS应用程序中使用libpd,使用iOS 7和Xcode 5.0.2。 libpd按预期工作(可以加载和与Pd补丁交互),但我在使用外部对象时遇到问题。

以下是我看到的错误消息:

Ld DerivedData/Build/Products/Debug-iphoneos/BrightHearts.app/BrightHearts normal armv7s
cd /Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts
setenv IPHONEOS_DEPLOYMENT_TARGET 7.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos 
-F/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos -filelist /Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Intermediates/BrightHearts.build/Debug-iphoneos/BrightHearts.build/Objects-normal/armv7s/BrightHearts.LinkFileList 
-dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -framework GLKit -framework OpenGLES -framework SystemConfiguration -framework Security -framework QuartzCore -framework CoreText /Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos/libpd-ios.a 
-framework AudioToolbox -framework AVFoundation -framework CoreBluetooth -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker 
/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Intermediates/BrightHearts.build/Debug-iphoneos/BrightHearts.build/Objects-normal/armv7s/BrightHearts_dependency_info.dat -o 
/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos/BrightHearts.app/BrightHearts

Undefined symbols for architecture armv7s:
  "_allsickles_setup", referenced from:
  -[SENViewController setupPD] in SENViewController.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我已经看到了为libpd子项目设置'Build Active Architecture'标志为YES的建议 - 这没有任何区别,我仍然得到相同的错误。

这个问题是否有解决方案(明显或其他方面)?

1 个答案:

答案 0 :(得分:0)

在我看来,你实际上并没有从Cyclone外部编译allsickles.c。该文件的方法为void allsickles_setup(void),我猜您正试图调用它来设置libpd。

如果您的项目中有allsickles.c,可能它实际上没有被编译,因此您可能需要将其添加到"编译源"在构建阶段。