Xcode:如何添加-lstdc ++

时间:2019-02-19 13:25:17

标签: xcode

我正在尝试使用Xcode和macOS Mojave编译已下载的项目unar / lsar,并且遇到了以下错误:

Ld /Users/lbombach/Library/Developer/Xcode/DerivedData/XADMaster-biomvrlnegkvpybpxhmxanmfdksv/Build/Products/Debug/UniversalDetector.framework/Versions/A/UniversalDetector normal x86_64 (in target: UniversalDetector)
    cd /Users/lbombach/Downloads/unar\ lsar/TheUnarchiverSource/UniversalDetector
    export MACOSX_DEPLOYMENT_TARGET=10.9
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/lbombach/Library/Developer/Xcode/DerivedData/XADMaster-biomvrlnegkvpybpxhmxanmfdksv/Build/Products/Debug -F/Users/lbombach/Library/Developer/Xcode/DerivedData/XADMaster-biomvrlnegkvpybpxhmxanmfdksv/Build/Products/Debug -filelist /Users/lbombach/Library/Developer/Xcode/DerivedData/XADMaster-biomvrlnegkvpybpxhmxanmfdksv/Build/Intermediates.noindex/UniversalDetector.build/Debug/UniversalDetector.build/Objects-normal/x86_64/UniversalDetector.LinkFileList -install_name @executable_path/../Frameworks/UniversalDetector.framework/Versions/A/UniversalDetector -mmacosx-version-min=10.9 -Xlinker -object_path_lto -Xlinker /Users/lbombach/Library/Developer/Xcode/DerivedData/XADMaster-biomvrlnegkvpybpxhmxanmfdksv/Build/Intermediates.noindex/UniversalDetector.build/Debug/UniversalDetector.build/Objects-normal/x86_64/UniversalDetector_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-link-runtime -lstdc++.6.0.9 -lc++.1 -framework AppKit -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/lbombach/Library/Developer/Xcode/DerivedData/XADMaster-biomvrlnegkvpybpxhmxanmfdksv/Build/Intermediates.noindex/UniversalDetector.build/Debug/UniversalDetector.build/Objects-normal/x86_64/UniversalDetector_dependency_info.dat -o /Users/lbombach/Library/Developer/Xcode/DerivedData/XADMaster-biomvrlnegkvpybpxhmxanmfdksv/Build/Products/Debug/UniversalDetector.framework/Versions/A/UniversalDetector

ld: library not found for -lstdc++.6.0.9
clang: error: linker command failed with exit code 1 (use -v to see invocation)

所以发生的是,有一部分说

  

UniversalDetector_lto.o -lstdc++.6.0.

...并且Xcode找不到。 I found another answer说我需要使用“链接二进制文件与图书馆”添加libc++.dylib,所以我这样做了:

enter image description here

带有lib++.dylib(它会自动添加.1libstdc++.6.0.9.dylib

但是我没有运气。

0 个答案:

没有答案