2

我在我的应用程序中使用 libxml2 框架。

但它显示了这个错误:

ld:找不到 -lxml2 的库 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

我还将标题搜索路径更改为 - /usr/include/libxml2

这是构建输出:

Ld /Users/classic/Library/Developer/Xcode/DerivedData/TeleSketchProj-aiaovvbknclizsekxxhxxqthzauf/Build/Products/Debug-iphoneos/TeleSketchProj.app/TeleSketchProj normal armv7
cd /Users/classic/Desktop/TeleSketchProj
setenv IPHONEOS_DEPLOYMENT_TARGET 5.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 armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -L/Users/classic/Library/Developer/Xcode/DerivedData/TeleSketchProj-aiaovvbknclizsekxxhxxqthzauf/Build/Products/Debug-iphoneos -L/Users/classic/Desktop/TeleSketchProj/Twitter+OAuth/SAOAuthTwitterEngine -F/Users/classic/Library/Developer/Xcode/DerivedData/TeleSketchProj-aiaovvbknclizsekxxhxxqthzauf/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/Developer/Library/Frameworks -filelist /Users/classic/Library/Developer/Xcode/DerivedData/TeleSketchProj-aiaovvbknclizsekxxhxxqthzauf/Build/Intermediates/TeleSketchProj.build/Debug-iphoneos/TeleSketchProj.build/Objects-normal/armv7/TeleSketchProj.LinkFileList -dead_strip -fobjc-arc -miphoneos-version-min=5.0 -lz -lxml2 -framework CFNetwork -framework SystemConfiguration -framework AVFoundation -framework AddressBookUI -framework AddressBook -framework MediaPlayer -framework AudioToolbox -framework MessageUI -framework MobileCoreServices -framework CoreAudio -framework Security -framework UIKit -framework Foundation -framework CoreGraphics -lOAuth -framework SenTestingKit -o /Users/classic/Library/Developer/Xcode/DerivedData/TeleSketchProj-aiaovvbknclizsekxxhxxqthzauf/Build/Products/Debug-iphoneos/TeleSketchProj.app/TeleSketchProj

请建议一些东西..

谢谢!

4

1 回答 1

0

尝试在应用程序的构建设置中的其他链接器标志中键入 -ObjC。它可能会工作......

于 2012-09-05T12:31:54.760 回答