2

ld: library not found for -lstdc++.6

clang: error: linker command failed with exit code 1 (use -v to see invocation)

There are quite a bunch of questions like me, But I not found any solution for this problem.

vipinsaini0
  • 541
  • 1
  • 7
  • 26
  • https://stackoverflow.com/questions/51060596/ld-library-not-found-for-lstdc-6 ? You also can have a look at the comment on my answer. You have to get rid of libstdc++6, and use libc++. You might have to rebuild your libraries/frameworks in order for them to use libc++ instead of libstdc++. – Larme Sep 22 '18 at 14:48
  • 1
    @Larme how to rebuild libraries/frameworks? – vipinsaini0 Sep 25 '18 at 09:36
  • So I guess you are not the creator of the lib/frameworks? It's like delivering an .app which isn't supported anymore on that OS version, you have to fix it and rebuilt it. Same here for the lib/Frameworks, ask the author. – Larme Sep 25 '18 at 09:37
  • @Larme I search in my project this libstdc ++ 6 but found that I haven't used libstdc ++ 6. So what I need to do? – vipinsaini0 Sep 25 '18 at 09:46
  • Could you the full error message? At least pint point what third party lib/framework you are using that is causing the issue? Also, it should be in link flags, and `-lstdc++6` or something like that. – Larme Sep 25 '18 at 09:48
  • I added libc++ and after that show another error. Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_FBLoginView", referenced from: objc-class-ref in Login.o "_OBJC_CLASS_$_FBErrorUtility", referenced from: objc-class-ref in Info.o "_OBJC_CLASS_$_FBSession", referenced from: objc-class-ref in AppDelegate.o objc-class-ref in Info.o "_OBJC_CLASS_$_FBAppCall", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) – vipinsaini0 Sep 25 '18 at 09:58
  • Finally. So the issue is with FaceBook. Are you using the up to date framework? I hope that they updated quickly they framework/lib. – Larme Sep 25 '18 at 09:59
  • after update facebookSDK getting again this error. ld: library not found for -lstdc++.6 clang: error: linker command failed with exit code 1 (use -v to see invocation) – vipinsaini0 Sep 25 '18 at 10:29

1 Answers1

0

Try copying from previous Xcode version like I did : cp -r /Applications/Xcode_9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/

cp /Applications/Xcode_9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libstdc++.* /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/

Shan
  • 1