【问题标题】:How to find the dependency that links to stdlibc++?如何找到链接到 stdlibc++ 的依赖项?
【发布时间】:2019-02-12 03:01:45
【问题描述】:

我目前正在开发一个在 Xcode 9.4.1 上正常运行的 iOS 项目。

由于苹果将强制所有提交到 App Store 的应用程序必须使用 iOS 12.1 SDK 或更高版本(包含在 Xcode 10.1 或更高版本中),因此,我计划升级我当前的项目以便它可以在 Xcode 10.1 上使用。

但是,我得到了这个stdlibc++ headers not found error..

Showing All Messages
ProcessPCH++ /Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/5421139595203421822/TV_Prefix.pch.gch /Users/nm/Desktop/temp\ v2\ code/iphone/from\ bitbucket/v2-ios-iphone/src/TV_Prefix.pch normal i386 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target: TV_iPhone)
    cd /Users/nm/Desktop/temp\ v2\ code/iphone/from\ bitbucket/v2-ios-iphone
    /Applications/Xcode10.1/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++-header -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -gmodules -Wno-trigraphs -fpascal-strings -O0 -Werror -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -isysroot /Applications/Xcode10.1/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -fasm-blocks -fstrict-aliasing -Wno-deprecated-declarations -Winvalid-offsetof -mios-simulator-version-min=6.0 -g -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -index-store-path /Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Index/DataStore -iquote /Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/Media\ Everywhere-generated-files.hmap -I/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/Media\ Everywhere-own-target-headers.hmap -I/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/Media\ Everywhere-all-target-headers.hmap -iquote /Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/Media\ Everywhere-project-headers.hmap -I/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Products/Debug-iphonesimulator/include -I/Applications/Xcode10.1/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/libxml2 -I/Applications/Xcode10.1/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/libxml2/libxml -I/Users/nm/Desktop/temp\ v2\ code/iphone/from\ bitbucket/v2-ios-iphone/opensource/Curl -I/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/DerivedSources/i386 -I/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/DerivedSources -F/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Products/Debug-iphonesimulator -F/Users/nm/Desktop/temp\ v2\ code/iphone/from\ bitbucket/v2-ios-iphone -F/Users/nm/Desktop/temp\ v2\ code/iphone/from\ bitbucket/v2-ios-iphone -c /Users/nm/Desktop/temp\ v2\ code/iphone/from\ bitbucket/v2-ios-iphone/src/TV_Prefix.pch -MD -MT dependencies -MF /Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/5421139595203421822/TV_Prefix.pch.d -iquote /Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/Media\ Everywhere-generated-files.hmap -I/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/Media\ Everywhere-own-target-headers.hmap -I/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/Media\ Everywhere-all-target-headers.hmap -iquote /Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/Media\ Everywhere-project-headers.hmap -I/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Products/Debug-iphonesimulator/include -I/Applications/Xcode10.1/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/libxml2 -I/Applications/Xcode10.1/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/libxml2/libxml -I/Users/nm/Desktop/temp\ v2\ code/iphone/from\ bitbucket/v2-ios-iphone/opensource/Curl -I/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/DerivedSources/i386 -I/Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/tv.build/Debug-iphonesimulator/TV_iPhone.build/DerivedSources -o /Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/5421139595203421822/TV_Prefix.pch.gch --serialize-diagnostics /Users/nm/Library/Developer/Xcode/DerivedData/tv-emcztnhcvllybhaitrhobnyjdasf/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/5421139595203421822/TV_Prefix.pch.dia
error: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Werror,-Wstdlibcxx-not-found]
1 error generated.

我知道 Xcode 10 不支持 libstdc++,我计划进行必要的更改。

由于这个项目不是我最初开发的,并且与它相关的人已经遥不可及,我有什么办法可以找到项目中的哪个文件依赖于stdlibc++强>?另外,我的项目没有使用任何 cocoapods 并且完全在 Objective-c 上开发

提前感谢您的帮助。 ^_^

【问题讨论】:

  • 产生该错误时正在编译什么文件?逐字复制该步骤的整个输出,然后编辑您的问题以将其粘贴到那里(标记为代码)。您可以右键单击或按住 Control 键单击构建日志中的错误行以获取复制命令。
  • 感谢@KenThomases 的建议

标签: ios objective-c


【解决方案1】:

它正在编译预编译的头文件:/Users/nm/Desktop/temp v2 code/iphone/from bitbucket/v2-ios-iphone/src/TV_Prefix.pch

它将它编译为 C++ 头文件。我不确定这是因为它在文件设置中被标记为 C++ 文件,还是只要项目中有任何 C++ 源文件时它就会这样做。

【讨论】:

    猜你喜欢
    • 2019-03-18
    • 2011-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多