如何用到C++等第三方庫(kù)出現(xiàn)?libstdc++.6.dylib這個(gè)庫(kù)無(wú)法找到 ?,可以選擇添加這個(gè)庫(kù)到新版本Xcode下,出現(xiàn)這個(gè)問(wèn)題相信你已經(jīng)搜索或知道此問(wèn)題了,Xcode 10以后已經(jīng)廢棄了libstdc++.6這個(gè)庫(kù),但是還有運(yùn)行或打包ipa上架的cash 看看能幫助你嗎 “ /usr/lib/libstdc++.6.dylib: mach , but not built for iOS simulator”
上面的問(wèn)題解決方法:
1.下載Xcode 10以前的庫(kù)libstdc++.6.0.9.tbd,還有l(wèi)ibstdc++.6.dylib(基本上這兩個(gè)庫(kù)我是解決的)
2.去這兩個(gè)地址添加 ? ? ?/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/
把兩個(gè)庫(kù)分別添加進(jìn)去 。
替換完運(yùn)行模擬器如果還出錯(cuò)的話
Xcode 10以上到11 去下面這個(gè)地址添加libstdc++.6.dylib庫(kù)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib
如果用的是Xcode11 或最新的?
最新的Xcode11以上去下面這個(gè)地址添加?libstdc++.6.dylib庫(kù)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
可去網(wǎng)上找找下載 嫌麻煩也可以去我QQ群文件下載387475841