question:
How does Xcode generate the list of framework directories (-F flags in the call to ld) when building a Cocoa app? I keep getting a warning for an old directory which (I think) I have removed from the project settings.
details:
I moved a working Xcode project from one directory to another. I had to fix some broken references to frameworks that now have a different relative path. Everything appears to be working, except for a single warning on the final linker step:
ld: warning: directory '../Some/Path/To/Framework' following -F not found
../Some/Path/To/Framework
is definitely part of the old setup. The external frameworks were stored in a directory that was one level up from the project file.
The full text of the call to ld looks something like this (lightly sanitized):
Ld /Volumes/Projects/Builds/Debug/MyApp.app/Contents/MacOS/MyApp normal i386
cd /Volumes/Projects/MyApp
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk
-L/Volumes/Projects/Builds/Debug -F/Volumes/Projects/Builds/Debug
-F../Some/Path/To/Framework
-F/Correct/Path/To/Framework
-filelist /Volumes/Projects/Builds/MyApp.build/Debug/MyApp.build/
Objects-normal/i386/MyApp.LinkFileList
-mmacosx-version-min=10.6
-framework Cocoa
-framework FRAMEWORK
-framework Carbon
-framework Quartz
-o /Volumes/Projects/Builds/Debug/MyApp.app/Contents/MacOS/MyApp
The warning is triggered by that old value for -F
. I have searched through all of the build settings, and everything points to /Correct/Path/To/Framew开发者_如何转开发ork
, not ../Some/Path/To/Framework
. I have also cleaned the entire build, but to no avail.
Check your build settings. The framework search paths are under Framework Search Paths, or build variable FRAMEWORK_SEARCH_PATHS.
精彩评论