godotengine / godotengine/godot-cpp
Cannot generate bindings on android
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
Hi there !
I am testing new merged PR for android, to see if I can getting it working with [fmod gdnative](https://github.com/utopia-rise/fmod-gdnative).
Here is the project structure I use to test:
```
rootTestProject
- godot-cpp (with headers in submodule)
- Fmod-gdnative
- libs (containing fmod api)
```
I work from OSX.
I have no problem generating bindings for OSX.
Here is output for android build:
```
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
/Users/piertho/Library/android-sdks/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -o src/core/Basis.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude/gen -Iinclude/core src/core/Basis.cpp
In file included from src/core/Basis.cpp:1:
In file included from include/core/Basis.hpp:4:
In file included from godot_headers/gdnative/basis.h:54:
In file included from godot_headers/gdnative/gdnative.h:141:
godot_headers/gdnative/string.h:39:10: fatal error: 'wchar.h' file not found
#include
^~~~~~~~~
1 error generated.
scons: *** [src/core/Basis.o] Error 1
scons: building terminated because of errors.
```
I first tried to generate bindings with:
```
scons platform=android generate_bindings=yes ANDROID_NDK_ROOT="/Users/piertho/Library/android-sdks/ndk-bundle" android_arch=arm64v8
```
Same problem if I set `ANDROID_NDK_ROOT` as OS environment variable and run:
```
scons platform=android generate_bindings=yes android_arch=arm64v8
```
So I tried to compile godot engine and add its executable path in command running:
```
scons godotbinpath="../godot/bin/godot.osx.tools.64" platform=android generate_bindings=yes ANDROID_NDK_ROOT="/Users/piertho/Library/android-sdks/ndk-bundle" android_arch=arm64v8
```
And I get the same output with that.
Then as a last try, I generated a new api.json from godot engine build and ran:
```
scons godotbinpath="../godot/bin/godot.osx.tools.64" platform=android generate_bindings=yes ANDROID_NDK_ROOT="/Users/piertho/Library/android-sdks/ndk-bundle" android_arch=arm64v8 use_custom_api_file=yes custom_api_file=api.json
```
(I put `api.json` in godot-cpp folder)
I get the same error with that.
@BastiaanOlij and @TGRCdev I need your help to finish testing new merged PR ;)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.