godotengine / godotengine/godot-docs
Can't cross-compile for iOS on Linux after following documentation
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
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
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](https://docs.godotengine.org/en/latest/contributing/development/compiling/cross-compiling_for_ios_on_linux.html) while using Xcode 14.3.1.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.