Objective c clang:错误:链接器命令失败,退出代码为1-找不到库

Objective c clang:错误:链接器命令失败,退出代码为1-找不到库,objective-c,xcode,clang,Objective C,Xcode,Clang,我在构建我的项目时遇到了一些问题。从上周开始,由于某种原因,我出现了贝娄错误,无法摆脱它 Ld /Users/Nathan/Library/Developer/Xcode/DerivedData/SmartPic-elnbgmemojraijcotdlcskagbibq/Build/Products/Debug-iphoneos/SmartPic.app/SmartPic normal armv7 cd "/Users/Nathan/Documents/Xcode Projects/Sm

我在构建我的项目时遇到了一些问题。从上周开始,由于某种原因,我出现了贝娄错误,无法摆脱它

Ld /Users/Nathan/Library/Developer/Xcode/DerivedData/SmartPic-elnbgmemojraijcotdlcskagbibq/Build/Products/Debug-iphoneos/SmartPic.app/SmartPic normal armv7
    cd "/Users/Nathan/Documents/Xcode Projects/SmartPic"
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
    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/Nathan/Library/Developer/Xcode/DerivedData/SmartPic-elnbgmemojraijcotdlcskagbibq/Build/Products/Debug-iphoneos
-F/Users/Nathan/Library/Developer/Xcode/DerivedData/SmartPic-elnbgmemojraijcotdlcskagbibq/Build/Products/Debug-iphoneos -filelist /Users/Nathan/Library/Developer/Xcode/DerivedData/SmartPic-elnbgmemojraijcotdlcskagbibq/Build/Intermediates/SmartPic.build/Debug-iphoneos/SmartPic.build/Objects-normal/armv7/SmartPic.LinkFileList -dead_strip -miphoneos-version-min=4.3 -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework EventKit -framework EventKitUI -framework MessageUI -lz -framework CoreLocation -framework UIKit -framework Foundation -framework CoreGraphics -framework QuartzCore -framework AVFoundation -framework CoreMedia -framework CoreMotion -framework CoreVideo -framework AudioToolbox -lDMReader -o /Users/Nathan/Library/Developer/Xcode/DerivedData/SmartPic-elnbgmemojraijcotdlcskagbibq/Build/Products/Debug-iphoneos/SmartPic.app/SmartPic

ld: library not found for -lDMReader
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我搜索了关于erorr的信息,因为在某一点上,我有6个其他类似的,答案是在构建设置中删除库搜索路径,这样就除去了最后一个。在我导入一些额外的框架和类之前,一切都很好。所以我不确定到底是什么原因造成的,我怎样才能修复它

我对应用程序开发还比较陌生,所以请尽量不要太过技术化


非常感谢您的帮助。

通过将“生成设置”中的库搜索路径更改为

./Classes“$(SRCROOT)/Classes”

以防万一其他人发现了这个,想试试看

编辑: 补充一句,我刚才又遇到了同样的问题。发生这种情况的原因是我更改了.xcodeproj文件中的文件夹名。因此,在我mac电脑的一个文件夹中,我有一个名为
App Name
的目录和一个名为
App Name.xcodeproj
的文件。我将目录应用程序名称更改为其他名称,尽管在xcode中更新了构建设置,但仍然存在相同的问题。我要做的是

  • 右键单击
    App Name.xcodeproj
  • 单击
    Show Package Contents
  • 打开
    project.pbxproj
  • 然后cmd+f(search)并输入
    App Name
    ,我认为只有两个位置,它们位于页面下方的1/3处,名为
    Name
    ,紧接着就是
    path
    。将它们更改为新的目录名,保存并重新打开项目,一切都会好起来