Xcode10 library not found for -lstdc++ 找不到问题
在Xcode9上正常编译的项目,在Xcode10上编译可能会遇到如下错误:
library not found for -lstdc++.6.0.
library not found for -lstdc++.
library not found for -lstdc++
这是因为Xcode10彻底废弃了libstdc++,相关的库文件libstdc++.6.0.9.dylib、libstdc++.6.dylib、libstdc++.dylib、libstdc++.6.0.9.tbd、libstdc++.6.tbd、libstdc++.tbd也从Xcode10中删除了。
最好的解决办法还是尽快转到libc++开发
如果还想要继续在Xcode10上编译依赖libstdc++的项目或库,可以通过把Xcode9中的libstdc++相关库文件复制到Xcode10中即可。
在Xcode9中搜索libstdc++相关的库,可以找到四个相关的文件:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libstdc++.6.0.9.dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libstdc++.6.0.9.tbd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libstdc++.6.0.9.tbd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libstdc++.6.0.9.tbd
但是只找到了libstdc++.6.0.9.dylib和libstdc++.6.0.9.tbd ,找不到libstdc++.6.dylib、libstdc++.dylib、libstdc++.6.tbd、libstdc++.tbd,前往找到的这4个路径中会就会发现libstdc++.6.dylib、libstdc++.dylib是libstdc++.6.0.9.dylib的替身,libstdc++.6.tbd、libstdc++.tbd是libstdc++.6.0.9.tbd 的替身:


所以我尝试将libstdc++.6.0.9.dylib和libstdc++.6.0.9.tbd 复制到Xcode10中,并制作libstdc++.6.dylib、libstdc++.dylib、libstdc++.6.tbd、libstdc++.tbd这四个替身文件,但是在模拟器上运行崩溃,自己制作替身的方案不可行,然后我改为了制作副本的方式成功在模拟器上运行。
libstdc++.6.0.9.dylib和libstdc++.6.0.9.tbd以及制作好的副本libstdc++.6.dylib、libstdc++.dylib、libstdc++.6.tbd、libstdc++.tbd下载地址点这里
真机运行库
在终端输入以下命令打开Xcode的lib库目录(此目录位安装的默认目录)
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib
如果安装在其他目录 或者Xcode改名的建议右键Xcode显示报内容,进入
Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib
获取到的 真机的 libstdc++.6.0.9.tbd 文件,扔进去或按照上方链接运行sh脚本
Xcode10 library not found for -lstdc++ 找不到问题的更多相关文章
- 73.解决Xcode10 library not found for -lstdc++ 找不到问题
Xcode10 彻底废除了libstdc++,相关文件libstdc++.6.0.9.dylib.libstdc++.6.dylib.libstdc++.dylib.libstdc++.6.0.9.t ...
- Xcode10报错 library not found for -lstdc++ 问题解决
在Xcode9上正常编译的项目,在Xcode10上编译可能会遇到如下错误: library not found for -lstdc++.6.0.9 library not found for -ls ...
- 更新Xcode10与iOS12 遇到的bug:library not found for -lstdc++.6.0.9
更新Xcode10与iOS12 遇到的bug:library not found for -lstdc++.6.0.9 解决办法:删除pod里导入的库文件,跑一下pod,再重新导入这些库文件,跑pod ...
- 报错:library not found for -lstdc++.6.0.9
在Xcode 10开发中, 报错:library not found for -lstdc++.6.0.9 解决方案:将Xcode9的libstdc++6.0.9.tbd拷贝到Xcode10中使用 X ...
- ld: library not found for -lstdc++.6
ld: library not found for -lstdc++.6 Xcode10 删除 libstdc++.6.tbd libstdc++.6.0.9.tbd 用 libc++.tbd lib ...
- Xcode10升级项目报错library not found for -lstdc++.6.0.9
在升级Xcode10后运行项目会发出报了一个错“library not found for -libstdc++.6.0.9”,很简单,就是因为xocde10后这个libstd++.6.0.9库已经不 ...
- Xcode10更新报错:library not found for -lstdc++.6.0.9
转载链接!:https://blog.csdn.net/timtian008/article/details/82792629 由于iPhone X Max 及iOS12系统的到来,必须升级xcode ...
- Xcode10:library not found for -lstdc++.6.0.9 临时解决
1.https://pan.baidu.com/s/1IkbZb6qaxgvghP1HEFQa6w?errno=0&errmsg=Auth%20Login%20Sucess&& ...
- 解决Xcode10 Library not loaded: /usr/lib/libstdc++.6造成的crash及报错
关键字1:dyld: Library not loaded: /usr/lib/libstdc++.6.dylib Referenced from: 关键字2:Reason: no suitabl ...
随机推荐
- Exercise about Shape
#include <iostream> using namespace std; class point { int x; int y; public : point () { x=y=; ...
- [macOS] macOS下,VirtualBox安装CentOS7.4, 搭建nginx, mysql, PHP5.6&PHP7.1
准备工作 网络设置 相关教程:http://www.jianshu.com/p/e6ba699b5992 ifcfg-enp0s3配置 TYPE=Ethernet BOOTPROTO=dhcp DEF ...
- 构建高性能的MYSQL数据库系统-主从复制
实验环境: DB1:172.16.1.100 DB2:172.16.1.101 VRRIP:172.16.1.99 步骤: yum -y install mysql 1.修改DB1的mysql配置文件 ...
- bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requested: lxml.
python3 bs4解析网页时报错: bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requeste ...
- go中 -strconv包的使用
strconv 包中的函数和方法 // atob.go ------------------------------------------------------------ // ParseBoo ...
- vue scoped 深度作用选择器
如果你希望 scoped 样式中的一个选择器能够作用得“更深”,例如影响子组件,你可以使用 >>> 操作符: <style scoped> .a >>> ...
- ansible的高级应用-roles
在之前我们知道了playbook,类似于shell的脚本,playbook适用于一些不太麻烦的部署任务,比如说使用playbook安装mysql,那么我们直接写一个playbook文件即可.可是如果我 ...
- 【题解】Luogu P2730 魔板
蒟蒻的第一道蓝题--好像也没有蓝的程度 一篇无STL的超弱题解(入门写法无误了QAQ 传送门 很经典的一道BFS 这是初始状态. 操作A 操作B 操作C 思路1 不使用cantor展开的情况 1. 对 ...
- jQuery 字符串拼接
jQuery 字符串拼接 // 字符串加变量拼接 $('#id 标签名[属性名="' + 变量 + '"]')
- Always clear download 下载 谷歌浏览器插件
由于该博文不支持上传压缩包,因此,如有需要always clear download插件的可点击此链接在百度网盘上下载https://pan.baidu.com/s/13wWchis3iKqXkIA5 ...