欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2022-03-28 16:29:58
在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中。文件位置...

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

解决方法: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导入项目,然后引用,这样就不用每次都要重新配置了。

 

本文地址:https://blog.csdn.net/xyanq2222/article/details/108119088