library not found for -lstdc++.6.0.9

 

d: warning: directory not found for option '-L/Users/whpc/Library/Developer/Xcode/DerivedData/InstallationPlatform-emxgvbriadwmiscbajbvqtdytnps/Build/Products/Debug-iphonesimulator/React'

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

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


原因:Xcode10取消了6.0.9的支持

最后贴一个最简单的办法,下一个lstdc++.6.0.9然后导入进去

 

下载地址:链接:https://pan.baidu.com/s/1BxIiD0dUV23niB5kveLzpw  密码:fesb

真机运行库

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib

模拟器运行库

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib

 

然后重新编译

 

 

 

 

运行之后又报这个:

Thread 1: signal SIGABRT

运行app卡在启动业

dyld: Library not loaded: /usr/lib/libstdc++.6.dylib

  Referenced from: /Users/whpc/Library/Developer/CoreSimulator/Devices/4351BA96-06B3-4A2A-A77E-C919B58D6F52/data/Containers/Bundle/Application/428E07A1-CF1E-429A-96EA-D6070B64D60A/InstallationPlatform.app/InstallationPlatform

  Reason: no suitable image found.  Did find:

/usr/lib/libstdc++.6.dylib: mach-o, but not built for iOS simulator

 

链接:https://pan.baidu.com/s/1FXzljYn09ImZ8uE08uUH2Q  密码:ceij

 

将下载的libstdc++.6.dylib和libstdc++.dylib文件放到下面目录中

 

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/

 

原文地址:https://www.cnblogs.com/gznuhaoge/p/10108941.html