Reference libstdc

Xcode upgrade to 10, 11, 12,, compile project using this library error

Methods:

  • True machine: Enter the directory Contents/Developer/Platforms/iPhoneOS platform/Developer/SDKs/iPhoneOS SDK/usr/lib, Copy libstdc++.6.0.9. TBD into the same directory as Xcode10, then right click to create a substitute and name it libstdc++.6.tbd. Clear and restart Xcode.

The specific path

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
Copy the code
  • The simulator: Similar, but different directory, enter the previous version of the directory Contents/Developer/Platforms/iPhoneSimulator platform/Developer/SDKs/iPhoneSimulator SDK/usr/lib, Copy libstdc++.6.0.9.dylib to the same directory as Xcode10, then right click to make a substitute and name it libstdc++.6.dylib. Clear and restart Xcode.

The specific path

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib /Copy the code

Resources links: pan.baidu.com/s/1WqasWsAN… Password: h69o

There’s no need to take notes

The code bought in ’16 won’t work

At runtime, an error is reported: #include #include could not find the main referenceXcode9-cpp

The main operating

  • Copy c++ from CPP folder to Xcode10 folder. Remember to distinguish between emulator and real machine

1) the real machineThe path

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/
Copy the code

Screenshot after import2)The path

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/inc lude/Copy the code
  • The importLibstdc++ 6.0.9. TBDlibrary

You need to put it in 4 directory paths where 1 is the same as step 3, step 4 and the top step of Xcode version1) Path of Xcode10

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes /iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/Copy the code

Xcode11, 12 path

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes /iOS.simruntime/Contents/Resources/RuntimeRoot/usr/libCopy the code
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
Copy the code
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
Copy the code
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib /Copy the code

Resources links 2: link: pan.baidu.com/s/1tbtQlJ1r… Password: 3aOK – from Baidu network disk super member V6 share