libstdc++.6.0.0.tbd 或 .dylib
libstdc++.6.0.0.tbd or .dylib
所以我正在开发一个应用程序和我使用的 SDK 的人需要添加 libstdc++.6.0.0.dylib
,当我搜索它时没有 .dylib,而是出现了一个 .tbd。
我刚刚用谷歌搜索了两者之间的区别,想知道我是否可以将 .tbd
添加到我的项目而不是 .dylib
?
添加库时,无需搜索列表,只需按 "Add Other" 然后手动导航至 /usr/lib 或只需按 "CMD + Shift + G" 然后输入“/usr/lib/libstdc++.dylib
这是一个临时解决方案。
- 下载 libstdc++。 https://raw.githubusercontent.com/luapower/libstdcxx/master/bin/linux64/libstdc%2B%2B.a
- 解压,复制
/libstdcxx-master/bin/linux64/libstdc++.a
到Xcode Frameworks,重命名libstdc++.6.0.9.a
,确保Link Binary With Libraries也添加到这个文件中。
- 运行再次编译通过
如果想解决问题,可以尝试手动复制文件到lib中。
1.iPhoneOS
和 iPhoneSimulator
文件
复制原始文件:libstdc++.6.0.9.tbd和libstdc++.6.tbd和libstdc++.tbd到:
/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/
2.iOS.simruntime
文件
复制原文件:libstdc++.6.0.9.dylib和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
如果你使用的是xcode11,你需要检查复制库libstdc++的路径。 ~~/usr/lib 路径已更改。
模拟器
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
ios
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
添加这个“libstdc++.6.dylib”。在下面的路径
对于模拟器
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
所以我正在开发一个应用程序和我使用的 SDK 的人需要添加 libstdc++.6.0.0.dylib
,当我搜索它时没有 .dylib,而是出现了一个 .tbd。
我刚刚用谷歌搜索了两者之间的区别,想知道我是否可以将 .tbd
添加到我的项目而不是 .dylib
?
添加库时,无需搜索列表,只需按 "Add Other" 然后手动导航至 /usr/lib 或只需按 "CMD + Shift + G" 然后输入“/usr/lib/libstdc++.dylib
这是一个临时解决方案。
- 下载 libstdc++。 https://raw.githubusercontent.com/luapower/libstdcxx/master/bin/linux64/libstdc%2B%2B.a
- 解压,复制
/libstdcxx-master/bin/linux64/libstdc++.a
到Xcode Frameworks,重命名libstdc++.6.0.9.a
,确保Link Binary With Libraries也添加到这个文件中。 - 运行再次编译通过
如果想解决问题,可以尝试手动复制文件到lib中。
1.iPhoneOS
和 iPhoneSimulator
文件
复制原始文件:libstdc++.6.0.9.tbd和libstdc++.6.tbd和libstdc++.tbd到:
/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/
2.iOS.simruntime
文件
复制原文件:libstdc++.6.0.9.dylib和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
如果你使用的是xcode11,你需要检查复制库libstdc++的路径。 ~~/usr/lib 路径已更改。
模拟器
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
ios
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
添加这个“libstdc++.6.dylib”。在下面的路径
对于模拟器 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/