xcode10 library not found for -lstdc++.6.0.9

hey同學發表於2019-01-09
    蘋果在XCode10和iOS12中移除了libstdc++這個庫,由libc++這個庫取而代之,

    拷貝舊Xcode中的庫,放到新的xcode中

    真機路徑
    /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/


    替換完成後在模擬器iOS10.0以上執行會出現一個錯誤:
    
    Reason: no suitable image found.  Did find:
    /usr/lib/libstdc++.6.dylib: mach-o, but not built for iOS simulator
 
 
 
    需要把 libstdc++.6.dylib  這個檔案放到下面這個路徑下
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
複製程式碼

相關文章