dyld: Library not loaded: /usr/lib/libstdc++.6.dylib

3.4k views Asked by At

Just installed Xcode 10, and got tis run time error. Do you have any idea what is wrong?

dyld: Library not loaded: /usr/lib/libstdc++.6.dylib
  Referenced from: /Users/kukodajanos/Library/Developer/CoreSimulator/Devices/50603E30-571E-484B-BABD-270D3D1F01AE/data/Containers/Bundle/Application/AFA530AF-2F31-4B26-ACE0-776070E28368/PFB.app/Frameworks/FoxitRDK.framework/FoxitRDK
  Reason: no suitable image found.  Did find:
    /usr/lib/libstdc++.6.dylib: mach-o, but not built for iOS simulator
(lldb) 

Previous Xcode app worked in simulator.

lipo -info /Users/kukodajanos/Workspace/PFB/FoxitRDK.framework/FoxitRDK 
Architectures in the fat file: /Users/kukodajanos/Workspace/PFB/FoxitRDK.framework/FoxitRDK are: i386 x86_64 armv7 arm64

As you see Foxit lipo shows it has also the i386 x86_64 architecture as well. So it should work on simulator.

Does this article mean we need to update Foxit to 5.0.0.1107?

1

There are 1 answers

0
Amy Lin On BEST ANSWER

This is a bug of Foxit PDF SDK V6.0 on iOS 12 and Foxit already fixed in V6.1. Please double check the version you are useing.

The background of this issue is that: Xcode 10 has removed "libstdc++.6.dylib", a temporary solution base on V6.0 is to copy libstdc++.6.dylib from Xcode 9.x to Xcode10. For Foxit PDF SDK V6.1 the SDK itself isn't reference libstdc++.6.dylib and reference libc++ instead (which is Apple recommend)