Open
Description
Tested versions
master [c4279fe3e0b27d0f40857c00eece7324a967285f]
System information
Ubuntu 22.04.4 LTS 22.04
Issue description
Get this error when trying to compile:
clang: error: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Werror,-Wstdlibcxx-not-found]
This patch fixes it, but not sure if this is the correct solution:
diff --git a/platform/ios/detect.py b/platform/ios/detect.py
index e3bac4ec5ce..ddb8e775803 100644
--- a/platform/ios/detect.py
+++ b/platform/ios/detect.py
@@ -126,6 +126,7 @@ def configure(env: "SConsEnvironment"):
CCFLAGS=(
"-fobjc-arc -arch x86_64"
" -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fblocks"
+ " -stdlib=libc++"
" -fasm-blocks -isysroot $IOS_SDK_PATH"
).split()
)
@@ -136,6 +137,7 @@ def configure(env: "SConsEnvironment"):
"-fobjc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing"
" -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits"
" -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies"
+ " -stdlib=libc++"
" -isysroot $IOS_SDK_PATH".split()
)
)
Steps to reproduce
Follow the steps from the documentation while using Xcode 14.3.1.