Xcode 10
之后删除的libstdc++
库
- 先下载下来这个项目,然后打开终端
cd
到libstdc--master
文件夹; - 如果你使用的是 Xcode 10,则将
install-xcode_10.sh
拖到终端中执行即可; - Xcode 11 之后的版本则将
install-xcode_11+.sh
拖到终端中执行。
处理过程请查看这篇文章:解决 Xcode 报 library not found for -lstdc++ 问题
Xcode 10 之后删除的 libstdc++ 库
Xcode 10
之后删除的libstdc++
库
cd
到libstdc--master
文件夹;install-xcode_10.sh
拖到终端中执行即可;install-xcode_11+.sh
拖到终端中执行。处理过程请查看这篇文章:解决 Xcode 报 library not found for -lstdc++ 问题
Traceback (most recent call last):
File "/Applications/Reveal.app/Contents/SharedSupport/Scripts/RevealServerCommands.py", line 18, in __lldb_init_module
HandleRevealCommand.doc = CreateRevealCommandOptionsParser().format_help()
File "/Applications/Reveal.app/Contents/SharedSupport/Scripts/RevealServerCommands.py", line 36, in CreateRevealCommandOptionsParser
for key, info in subcommands.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
dyld: Library not loaded: /usr/lib/libstdc++.6.dylib
Referenced from: /Users/xx/Library/Developer/CoreSimulator/Devices/CEECA0B7-6182-457A-B38F-DC6ACD5D58B9/data/Containers/Bundle/Application/097B5C06-10CF-464D-AE1D-CE3D3EB79580/xxs.app/xx
Reason: no suitable image found. Did find:
/usr/lib/libstdc++.6.dylib: mach-o, but not built for iOS simulator
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_CDVURLProtocol", referenced from:
type metadata for 工作助手.PhotoLibraryProtocol in PhotoLibraryProtocol.o
"OBJC_METACLASS$_CDVURLProtocol", referenced from:
OBJC_METACLASS$_PhotoLibraryProtocol in PhotoLibraryProtocol.o
"_SWIFT_CDVCommandStatus_OK", referenced from:
partial apply forwarder for closure #1 () -> () in 工作助手.PhotoLibrary.getAlbums(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
partial apply forwarder for closure #1 () -> () in 工作助手.PhotoLibrary.getPhotosFromAlbum(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
partial apply forwarder for closure #1 () -> () in 工作助手.PhotoLibrary.isAuthorized(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
工作助手.PhotoLibrary.stopCaching(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
closure #1 () -> () in 工作助手.PhotoLibrary.requestAuthorization(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
function signature specialization <Arg[0] = Exploded> of 工作助手.PhotoLibrary.returnPictureData(callbackId: Swift.String, base64: Swift.String?, mimeType: Swift.String?) -> () in PhotoLibrary.o
partial apply forwarder for closure #1 (__C.NSDictionary?, Swift.String?) -> () in closure #1 () -> () in 工作助手.PhotoLibrary.saveImage(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
...
"_CDVPageDidLoadNotification", referenced from:
-[CDVSplashScreen pluginInitialize] in CDVSplashScreen.o
-[CDVWKWebViewEngine webView:didFinishNavigation:] in CDVWKWebViewEngine.o
"OBJC_CLASS$_CDVUIWebViewDelegate", referenced from:
objc-class-ref in CDVUIInAppBrowser.o
objc-class-ref in CDVThemeableBrowser.o
"_CDVPluginHandleOpenURLNotification", referenced from:
-[CDVUIInAppBrowser openInSystem:] in CDVUIInAppBrowser.o
-[CDVWKInAppBrowser openInSystem:] in CDVWKInAppBrowser.o
-[CDVThemeableBrowser openInSystem:] in CDVThemeableBrowser.o
-[CDVWKWebViewEngine webView:decidePolicyForNavigationAction:decisionHandler:] in CDVWKWebViewEngine.o
"_CDVPluginResetNotification", referenced from:
-[CDVWKWebViewEngine webView:didStartProvisionalNavigation:] in CDVWKWebViewEngine.o
"OBJC_CLASS$_CDVConfigParser", referenced from:
objc-class-ref in CodePush.o
"OBJC_METACLASS$_CDVPlugin", referenced from:
OBJC_METACLASS$_CFCallNumber in CFCallNumber.o
OBJC_METACLASS$_Screenshot in Screenshot.o
OBJC_METACLASS$_startApp in startApp.o
OBJC_METACLASS$_CDVFile in CDVFile.o
OBJC_METACLASS$_CordovaHttpPlugin in CordovaHttpPlugin.o
OBJC_METACLASS$_AppVersion in AppVersion.o
OBJC_METACLASS$_AppAvailability in AppAvailability.o
...
"OBJC_METACLASS$_CDVViewController", referenced from:
OBJC_METACLASS$_MainViewController in MainViewController.o
OBJC_METACLASS$_WebViewController in WebViewPlugin.o
"OBJC_CLASS$_CDVPlugin", referenced from:
OBJC_CLASS$_CFCallNumber in CFCallNumber.o
OBJC_CLASS$_Screenshot in Screenshot.o
OBJC_CLASS$_startApp in startApp.o
OBJC_CLASS$_CDVFile in CDVFile.o
OBJC_CLASS$_CordovaHttpPlugin in CordovaHttpPlugin.o
OBJC_CLASS$_AppVersion in AppVersion.o
OBJC_CLASS$_AppAvailability in AppAvailability.o
...
"_SWIFT_CDVCommandStatus_ERROR", referenced from:
partial apply forwarder for closure #1 () -> () in 工作助手.PhotoLibrary.getLibrary(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
partial apply forwarder for closure #1 () -> () in 工作助手.PhotoLibrary.getAlbums(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
partial apply forwarder for closure #1 () -> () in 工作助手.PhotoLibrary.getPhotosFromAlbum(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
partial apply forwarder for closure #1 () -> () in 工作助手.PhotoLibrary.getThumbnail(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
partial apply forwarder for closure #1 () -> () in 工作助手.PhotoLibrary.getPhoto(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
partial apply forwarder for closure #1 () -> () in 工作助手.PhotoLibrary.getLibraryItem(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
closure #2 (Swift.String) -> () in 工作助手.PhotoLibrary.requestAuthorization(__C.CDVInvokedUrlCommand) -> () in PhotoLibrary.o
...
"OBJC_CLASS$_CDVViewController", referenced from:
OBJC_CLASS$MainViewController in MainViewController.o
objc-class-ref in CDVFile.o
l_OBJC$CATEGORY_CDVViewController$_StatusBar in CDVStatusBar.o
OBJC_CLASS$WebViewController in WebViewPlugin.o
l_OBJC$CATEGORY_CDVViewController$_SplashScreen in CDVViewController+SplashScreen.o
objc-class-ref in CDVWKWebViewEngine.o
"OBJC_METACLASS$_CDVCommandDelegateImpl", referenced from:
OBJC_METACLASS$_MainCommandDelegate in MainViewController.o
"OBJC_CLASS$_CDVPluginResult", referenced from:
objc-class-ref in CFCallNumber.o
objc-class-ref in Screenshot.o
objc-class-ref in startApp.o
objc-class-ref in CDVFile.o
objc-class-ref in CDVLocalFilesystem.o
objc-class-ref in CDVAssetLibraryFilesystem.o
objc-class-ref in CordovaHttpPlugin.o
...
"OBJC_METACLASS$_CDVAppDelegate", referenced from:
OBJC_METACLASS$_AppDelegate in AppDelegate.o
"OBJC_CLASS$_CDVCommandDelegateImpl", referenced from:
OBJC_CLASS$_MainCommandDelegate in MainViewController.o
"OBJC_CLASS$_CDVUserAgentUtil", referenced from:
objc-class-ref in CDVWKWebViewEngine+CodePush.o
objc-class-ref in CDVUIInAppBrowser.o
objc-class-ref in CDVWKInAppBrowser.o
objc-class-ref in CDVThemeableBrowser.o
objc-class-ref in CDVWKWebViewEngine.o
"OBJC_CLASS$_CDVCommandQueue", referenced from:
OBJC_CLASS$_MainCommandQueue in MainViewController.o
"OBJC_METACLASS$_CDVCommandQueue", referenced from:
OBJC_METACLASS$_MainCommandQueue in MainViewController.o
"OBJC_CLASS$_CDVInvokedUrlCommand", referenced from:
objc-class-ref in CDVFile.o
objc-class-ref in CodePush.o
objc-class-ref in CDVWKWebViewEngine.o
"OBJC_CLASS$_CDVAppDelegate", referenced from:
OBJC_CLASS$_AppDelegate in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
xcode13 support
如题请问。
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
/Users/wangjunjie/Documents/cmake_source/t1/main.cpp:1:10: fatal error: 'iostream' file not found
#include
^~~~~~~~~~
期待大神解决
以前的Xcode版本没问题。报错内容是/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib is not a directory
,看来是Xcode15修改了对应路径,不知道有谁有解决方法?
cp: 1/: No such file or directory
cp: 2/: No such file or directory
cp: 3/: No such file or directory
cp: 4/: No such file or directory
xcode12.0
把 install-Xcode_11-beta.sh
文件里的路径都改成正式环境的路径
sudo cp 1/* /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
sudo cp 2/* /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
sudo cp 3/* /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
sudo cp 4/* /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/
执行install-Xcode_11.sh报错
恢复完文件后,我在M1芯片的XCode13中的iOS14.2运行应用的时候,仍然报错提示:
dyld: Library not loaded: /usr/lib/libstdc++.6.dylib Referenced from: /Users/symous/Library/Developer/CoreSimulator/Devices/A28EB60E-5A98-4082-993C-2228F6C32C36/data/Containers/Bundle/Application/5BA098DA-926B-447B-9BFD-47EE764EC534/symousReact.app/symousReact Reason: image not found dyld: launch, loading dependent libraries DYLD_SHARED_CACHE_DIR=/Users/symous/Library/Developer/CoreSimulator/Caches/dyld/21A559/com.apple.CoreSimulator.SimRuntime.iOS-14-2.18B79 DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 14.2.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/symous/Library/Developer/Xcode/DerivedData/symousReact-hgljttfucnynuifixuyfjnjgdbct/Build/Products/Debug-iphonesimulator:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 14.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 14.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 14.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 14.2.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.fr
但是在iOS15中是可以正常运行的,请问还需要配置哪里,谢谢。
/Users/xxxx/Downloads/libstdc--master/install-xcode_11+.sh: command not found
恢复完文件后,我在M1芯片的XCode13中的iOS14.2(无论是真机还是模拟器)运行应用的时候,仍然报错提示:
dyld: Library not loaded: /usr/lib/libstdc++.6.dylib Referenced from: /Users/symous/Library/Developer/CoreSimulator/Devices/A28EB60E-5A98-4082-993C-2228F6C32C36/data/Containers/Bundle/Application/5BA098DA-926B-447B-9BFD-47EE764EC534/symousReact.app/symousReact Reason: image not found dyld: launch, loading dependent libraries DYLD_SHARED_CACHE_DIR=/Users/symous/Library/Developer/CoreSimulator/Caches/dyld/21A559/com.apple.CoreSimulator.SimRuntime.iOS-14-2.18B79 DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 14.2.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/symous/Library/Developer/Xcode/DerivedData/symousReact-hgljttfucnynuifixuyfjnjgdbct/Build/Products/Debug-iphonesimulator:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 14.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 14.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 14.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 14.2.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.fr
但是在iOS15(无论是真机还是模拟器)是可以正常运行的,请问还需要配置哪里,谢谢。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.