更新时间:2023-11-10 16:34:10
通过将构建设置中的库搜索路径更改为
来解决此问题。./类$(SRCROOT)/ Classes p>
只要其他人找到这个并想试试。
编辑:
只是添加,我有同样的问题,只是现在实际上。发生在我身上的原因是因为我改变了.xcodeproj文件所在的文件夹名称。所以在我的Mac上的文件夹中有一个名为应用程序名称
的目录和名为 App Name.xcodeproj
的文件夹。我改变目录应用程序名称到不同的东西,尽管更新了xcode中的构建设置,仍然有同样的问题。我必须做的是
App Name.xcodeproj
显示包内容
project.pbxproj
应用程序名称
,我认为只有两个地方,他们是1 / 3下面,调用 name
,紧接在下面, path
。将它们更改为新目录名称,保存并重新打开您的项目,所有内容都应该很好。I have a bit of a problem building my project. I'm getting the bellow error for some reason since last week and cannot get rid of it.
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)
I searched for information about the erorr, as, at one point, I had 6 other similar ones and the answer was to delete Library Search Paths in the Build Settings and that got rid of all but this last one. It was all fine until I imported some extra frameworks and classes. So not sure really what's caused it and how I can fix it.
I'm still fairly new to app development, so please try not to get too technical.
Any help is much appreciated, thank you.
Solved this by changing Library Search Paths in Build Settings to
./Classes "$(SRCROOT)/Classes"
Just in case anyone else finds this and wants to give it a try.
EDIT:
Just to add, I had this same problem again just now actually. And the reason it happened for me is because I changed the folder name that sits with the .xcodeproj file. So In a folder on my mac I had a directory called App Name
and file called App Name.xcodeproj
. I changed the directory App Name to something different and despite updating the build settings in xcode, still had the same problem. What I had to do was
App Name.xcodeproj
Show Package Contents
project.pbxproj
App Name
, I think there were just two places and they were 1/3 of the way down the page, called name
and immediately below, path
. Change them to the new directory name, save and reopen your project and all should be well.