6

I am trying to build my Xcode project, but I'm getting an error saying Apple Mach-O Linker Error

Here's what the error says:

Ld /Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Products/Debug-iphonesimulator/SocialMediaAppThing.app/SocialMediaAppThing normal x86_64 cd /Users/jordanbaron/Desktop/SocialMediaAppThing export IPHONEOS_DEPLOYMENT_TARGET=10.2 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk -L/Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Products/Debug-iphonesimulator -F/Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Products/Debug-iphonesimulator -F/Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Products/Debug-iphonesimulator/GTMSessionFetcher -F/Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac -F/Users/jordanbaron/Desktop/SocialMediaAppThing/Pods/FirebaseAnalytics/Frameworks -F/Users/jordanbaron/Desktop/SocialMediaAppThing/Pods/FirebaseAuth/Frameworks -F/Users/jordanbaron/Desktop/SocialMediaAppThing/Pods/FirebaseCore/Frameworks -F/Users/jordanbaron/Desktop/SocialMediaAppThing/Pods/FirebaseInstanceID/Frameworks -filelist /Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Intermediates/SocialMediaAppThing.build/Debug-iphonesimulator/SocialMediaAppThing.build/Objects-normal/x86_64/SocialMediaAppThing.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=10.2 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Intermediates/SocialMediaAppThing.build/Debug-iphonesimulator/SocialMediaAppThing.build/Objects-normal/x86_64/SocialMediaAppThing_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Intermediates/SocialMediaAppThing.build/Debug-iphonesimulator/SocialMediaAppThing.build/Objects-normal/x86_64/SocialMediaAppThing.swiftmodule -ObjC -lc++ -lsqlite3 -lz -framework FirebaseAnalytics -framework FirebaseAuth -framework FirebaseCore -framework FirebaseInstanceID -framework GTMSessionFetcher -framework GoogleToolboxForMac -framework Security -framework StoreKit -framework SystemConfiguration -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Intermediates/SocialMediaAppThing.build/Debug-iphonesimulator/SocialMediaAppThing.build/SocialMediaAppThing.app.xcent -framework Pods_SocialMediaAppThing -Xlinker -dependency_info -Xlinker /Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Intermediates/SocialMediaAppThing.build/Debug-iphonesimulator/SocialMediaAppThing.build/Objects-normal/x86_64/SocialMediaAppThing_dependency_info.dat -o /Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Products/Debug-iphonesimulator/SocialMediaAppThing.app/SocialMediaAppThing

ld: warning: directory not found for option '-F/Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Products/Debug-iphonesimulator/GTMSessionFetcher' ld: warning: directory not found for option '-F/Users/jordanbaron/Library/Developer/Xcode/DerivedData/SocialMediaAppThing-efwjgynvqfyiotcrqqssiwhsryyw/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac' ld: framework not found GTMSessionFetcher clang: error: linker command failed with exit code 1 (use -v to see invocation)

Jordan Baron
  • 165
  • 1
  • 15
  • 1
    Did you try to clean your project and build it ? cmd + shift + T and cmd + B – YMonnier Mar 30 '17 at 18:37
  • Seems like cleaning your DerivedData would be a good place to start. To do so, you can follow this [helpful link](http://stackoverflow.com/questions/38016143/how-to-delete-derived-data-in-xcode-8). Best of luck! – Ritvik Upadhyaya Mar 30 '17 at 18:48
  • 1
    Those don't work :( – Jordan Baron Mar 30 '17 at 18:53
  • 1
    So I am sure you are doing it right, but is there a chance you opened on your .xcproj file in place of your .xcworkspace file if you are using cocoapods? – Ritvik Upadhyaya Mar 30 '17 at 19:05
  • I think that was it. – Jordan Baron Mar 30 '17 at 19:14
  • 2
    I don`t know why, but it is not working anymore, now in Xcode 8.3.2 – Ivan Sinigaglia Apr 20 '17 at 15:55
  • 1
    having the same problem – Raul Claus May 03 '17 at 07:02
  • 3
    i am also having the same problem . before the app was working perfectly fine but after updating to xcode 8.3.2 it is giving me this error and i followed all the solution given here but no use . same issue . let me know if the problem is solved by anyone ... – Moxarth May 15 '17 at 09:54
  • Did you ever figure it out @Moxarth, I'm also having this issue now. I just upgraded to 8.3.2 – John Riselvato May 29 '17 at 12:51
  • no , i could not find any . so again i am using xcode 8.2 . because i could not waste more time to find these silly mistakes done by apple . sometimes it is working perfectly fine and then very next time it is not . it should solve by apple soon . this is so irritating for developers that there is not even single stable solution for this kind of errors . hope apple would come up with some ideas to solve this . – Moxarth May 29 '17 at 13:06
  • I know i am late but it may help anyone else later. O linker Mostly Occure when you use same names for properties or objectives in two different classes – Abu Ul Hassan Sep 25 '17 at 10:47

0 Answers0