当前位置: 代码迷 >> 综合 >> 升级xcode报错library not found for -lstdc++.6.0.9
  详细解决方案

升级xcode报错library not found for -lstdc++.6.0.9

热度:3   发布时间:2024-02-12 18:39:23.0

在xcode9 升级 xcode10 以上版本或者维护比较旧项目时时报错library not found for -lstdc++.6.0.9或者 library not found for -lstdc++,这是因为Xcode10以上版本中libstdc++.6.0.9和libstdc++被移除,Frameworks中libstdc++.6.0.9和libstdc++找不到对应的库。

解决方法:1.将Xcode9中拷贝 -lstdc++.6.0.9以及libstdc++等库到Xcode10中。文件位置 :

真机:/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

注意:模拟器和真机都需要拷贝

这种方法有一个弊端就是别人下载了你的项目,也需要重新搞一次上述操作,所以我们提出下面方法,直接将libstdc++.6.0.9导入项目,然后引用,这样就不用每次都要重新配置了。

 

  相关解决方案