How do I get rid of this linker warning that appears every time I build my project in XCode?
Ld build/Sidestep.build/Release/Sidestep.build/Objects-normal/x86_64/Sidestep normal x86_64
cd /Users/Chetan/Development/Sidestep
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/gcc-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/Chetan/Development/Sidestep/build/Release -F/Users/Chetan/Development/Sidestep/build/Release -F/Users/Chetan/Development/Sidestep/frameworks -F/Users/Chetan/Development/Sidestep -filelist /Users/Chetan/Development/Sidestep/build/Sidestep.build/Release/Sidestep.build/Objects-normal/x86_64/Sidestep.LinkFileList -mmacosx-version-min=10.6 -framework Security -framework Cocoa -framework SystemConfiguration -framework IOKit -framework Sparkle -o /Users/Chetan/Development/Sidestep/build/Sidestep.build/Release/Sidestep.build/Objects-normal/x86_64/Sidestep
ld: warning: directory '/Users/Chetan/Development/Sidestep/frameworks' following -F not found
I don't have the folder /Users/Chetan/Development/Sidestep/frameworks anymore, since I deleted it.
Remove that directory from the "framework search paths" in the build settings for the project, or for that target.
Related
I was trying to add the parse framework to my project but i have these 2 errors as soon as i added them. I can see the parse framework under the link binary with libraries but for some reason Xcode does not see the framework. I also tried opening a new project and adding the parse.framework folder again,yet the result is the same. Any help is appreciated.
Ld /Users/Home/Library/Developer/Xcode/DerivedData/EatNOW-hhzgxrbjavpslhgovolovnupbeaf/Build/Products/Debug-iphonesimulator/EatNOW.app/EatNOW normal i386
cd /Library/Developer/California/EatNOW/EatNOW
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/Home/Library/Developer/Xcode/DerivedData/EatNOW-hhzgxrbjavpslhgovolovnupbeaf/Build/Products/Debug-iphonesimulator -F/Users/Home/Library/Developer/Xcode/DerivedData/EatNOW-hhzgxrbjavpslhgovolovnupbeaf/Build/Products/Debug-iphonesimulator -F/Library/Developer/California/EatNOW/EatNOW -filelist /Users/Home/Library/Developer/Xcode/DerivedData/EatNOW-hhzgxrbjavpslhgovolovnupbeaf/Build/Intermediates/EatNOW.build/Debug-iphonesimulator/EatNOW.build/Objects-normal/i386/EatNOW.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -lsqlite3.0 -framework UIKit -framework Foundation -framework CoreGraphics -framework "Parse " -o /Users/Home/Library/Developer/Xcode/DerivedData/EatNOW-hhzgxrbjavpslhgovolovnupbeaf/Build/Products/Debug-iphonesimulator/EatNOW.app/EatNOW
ld: framework not found Parse
clang: error: linker command failed with exit code 1 (use -v to see invocation)
GenerateDSYMFile /Users/Home/Library/Developer/Xcode/DerivedData/EatNOW-hhzgxrbjavpslhgovolovnupbeaf/Build/Products/Debug-iphonesimulator/EatNOW.app.dSYM /Users/Home/Library/Developer/Xcode/DerivedData/EatNOW-hhzgxrbjavpslhgovolovnupbeaf/Build/Products/Debug-iphonesimulator/EatNOW.app/EatNOW
cd /Library/Developer/California/EatNOW/EatNOW
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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/dsymutil /Users/Home/Library/Developer/Xcode/DerivedData/EatNOW-hhzgxrbjavpslhgovolovnupbeaf/Build/Products/Debug-iphonesimulator/EatNOW.app/EatNOW -o /Users/Home/Library/Developer/Xcode/DerivedData/EatNOW-hhzgxrbjavpslhgovolovnupbeaf/Build/Products/Debug-iphonesimulator/EatNOW.app.dSYM
error: unable to open executable '/Users/Home/Library/Developer/Xcode/DerivedData/EatNOW-hhzgxrbjavpslhgovolovnupbeaf/Build/Products/Debug-iphonesimulator/EatNOW.app/EatNOW'
You need to specify where the linker will find the framework. In your target's Build Settings, find the section called Search Paths. In Framework Search Paths field, add the file path of your Parse framework so that it can be located in linking.
I'm having a compilation issue
Ld /Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug/RemoteDesktop.app/Contents/MacOS/RemoteDesktop normal x86_64
cd /Users/ppdeveloper/Desktop/app/RemoteDesktop
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug -F/Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug -filelist /Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Intermediates/RemoteDesktop.build/Debug/RemoteDesktop.build/Objects-normal/x86_64/RemoteDesktop.LinkFileList -mmacosx-version-min=10.5 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -framework Cocoa -framework Foundation -framework AppKit /Users/ppdeveloper/Desktop/app/RemoteDesktop/RemoteDesktop/include -fobjc-link-runtime -framework Foundation -framework CoreData -framework AppKit -framework CoreFoundation -lz -framework Cocoa -o /Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug/RemoteDesktop.app/Contents/MacOS/RemoteDesktop
ld: **can't map file, errno=22 for architecture x86_64**
clang: error: **linker command failed with exit code 1 (use -v to see invocation)**
I have no idea where the item /Users/ppdeveloper/Desktop/app/RemoteDesktop/RemoteDesktop/include comes from in your compile/link options, but it looks like a directory, so it’s probably missing a preceeding -I to state that you search in this directory.
If the linker tries to load this directory as a file, it sees an EINVAL aka errno 22.
Using ObjectiveFlickr, Xcode 4.5.2, iOS 6.
When compiling, it gets me:
Ld /Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator/Shutterbug. app/Shutterbug normal i386
cd /Users/axu/prj/ios/Shutterbug
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode. app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk - L/Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator - F/Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator -filelist /Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Intermediates/Shutterbug.build/Debug- iphonesimulator/Shutterbug.build/Objects-normal/i386/Shutterbug.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime - Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 /Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug- ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator/ObjectiveFlickr/ObjectiveFlickr /Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator/libObjectiveFlickr.a - framework UIKit -framework Foundation -framework CoreGraphics -o /Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug- ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator/Shutterbug.app/Shutterbug
clang: error: no such file or directory: '/Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug- iphonesimulator/ObjectiveFlickr/ObjectiveFlickr'
I don't know why it is asking a **/ObjectiveFlickr/ObjectiveFlickr which I never set anywhere.
If you review the command starting with:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/...
you will find:
/Users/axu/Library/Developer/Xcode/DerivedData/Shutterbug-ecsrjcjimihxevguffdchwqnqtzf/Build/Products/Debug-iphonesimulator/ObjectiveFlickr/ObjectiveFlickr
So there is definitely something wrong in your project.
One easy way to check this is opening your *.xcodeproj/project.pbxproj project file in a text editor and search for ObjectiveFlickr to see if everything is correct.
Last night, when I finished working on my project, there were no errors. But today, when I opened my project, I had the Apple Mach-O link (id) error. Here is the error: `Ld /Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Products/Debug-iphonesimulator/WhereAmI.app/WhereAmI normal i386
cd "/Users/chandlerdeangelis/Desktop/Real Estate App"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Products/Debug-iphonesimulator -F/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Products/Debug-iphonesimulator -filelist /Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmI.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework MapKit -framework CoreLocation -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Products/Debug-iphonesimulator/WhereAmI.app/WhereAmI
duplicate symbol _OBJC_IVAR_$_WhereAmIAppDelegate._window in:
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIAppDelegate.o
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIViewController.o
duplicate symbol _OBJC_IVAR_$_WhereAmIAppDelegate._viewController in:
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIAppDelegate.o
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIViewController.o
duplicate symbol _OBJC_METACLASS_$_WhereAmIAppDelegate in:
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIAppDelegate.o
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIViewController.o
duplicate symbol _OBJC_CLASS_$_WhereAmIAppDelegate in:
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIAppDelegate.o
/Users/chandlerdeangelis/Library/Developer/Xcode/DerivedData/WhereAmI-bdyziqhatjrwffgkgfvwvtoxdroa/Build/Intermediates/WhereAmI.build/Debug-iphonesimulator/WhereAmI.build/Objects-normal/i386/WhereAmIViewController.o
ld: 4 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`
Can anyone help me out?
Several symbols, (WhereAmIAppDelegate._window, WhereAmIAppDelegate._viewController, ...) are defined duplicate: in WhereAmIAppDelegate.o and in WhereAmIViewController.o.
A likely cause for this error is that you have imported an ".m" file instead of the ".h" file somewhere. Perhaps you have an #import "WhereAmIAppDelegate.m" in WhereAmIViewController.m" ?
after adding the OCMock framework i got that strange error... :(
ld: file not found: -fobjc-arc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like if the compiler flag tries to be loaded by XCode?
Any idea?
Best regards, hijolan
I was getting the exact same error on Xcode 4.3.2. Here's my navigator log; I'm adding it for Google juice.
Ld /Users/makdad/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator/JournalTests.octest/JournalTests normal i386
cd /Users/makdad/Documents/MT/mt-mobile/iOS/Journal
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator -F/Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Intermediates/Journal.build/Debug-iphonesimulator/JournalTests.build/Objects-normal/i386/JournalTests.LinkFileList -mmacosx-version-min=10.6 -bundle_loader /Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator/Journal.app/Journal -Xlinker -objc_abi_version -Xlinker 2 -ObjC -force_load -fobjc-arc -ftest-coverage -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -lOCMock -framework Twitter -framework MapKit -framework MobileCoreServices -framework SystemConfiguration -lxml2 -licucore -framework CoreData -framework CoreGraphics -framework CFNetwork -framework QuartzCore -framework SenTestingKit -framework UIKit -framework Foundation -o /Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator/JournalTests.octest/JournalTests
The OCMock instructions explicitly ask you to add linker flags -- -ObjC and -force_load.
-force_load is expecting a value -- see the answer to this question that explains that -all_load is what to use if you don't want to specify a library name.
As someone who just spent 25 minutes on this, I should check again with the OCMock tutorial -- I don't think it was very clear in this instruction.
This blog post has a much better image that shows exactly how your settings should look.