Open piiertho opened 4 years ago
I followed the exact same step than @piiertho but on Windows. I get the same error.
D:\Developpement\repoffi\godot-cpp>scons godotbinpath="../godot/bin/godot.windows.opt.tools.64.exe" platform=android generate_bindings=yes ANDROID_NDK_ROOT="C:/Android/NDK" android_arch=arm64v8
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
C:/Android/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -o src\core\AABB.o -c --target=aarch64-linux-android21 -march=armv8-a -fPIC -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\AABB.cpp
=====
In file included from src\core\AABB.cpp:1:
In file included from include\core\AABB.hpp:4:
In file included from include\core/Vector3.hpp:4:
In file included from godot_headers\gdnative/vector3.h:54:
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 <wchar.h>
^~~~~~~~~
1 error generated. ```
I'm trying to reproduce this. I created a blank Windows 10 virtual machine, and only installed Git, Scons and the NDK, and it was still able to compile fine.
It seems like Scons isn't properly setting the sysroot during NDK compile, but NDK's clang scripts should do that automatically. I'm not sure how this is happening.
Could you try re-downloading your NDK? Maybe some of the headers got deleted by accident at some point.
I'm using the 16b NDK version (because that only one that worked for me when I compile the engine for android). What version do you use ?
Same version than @CedNaru. I can use it to build for android with my PR. I'll try with new sdk to see if it cause the problem.
Sorry for double message. Here are my test results ! (Done with a windows linux kernel)
It compiles well with ndk20. But I think we have to check wich ndk version works with godot engine itself. I sucessfully compiled fmod gdnative with it.
I did not try to run it for now, I have to export my project and I am not at home ^^ I have some reserves on ENV variables. I think not all is defined in the current scons version like it is told in this documentation (I can add them if you want, it is the same thing than in my PR)
Also I can add travis-ci job (pretty much the same than in my PR).
If I resume, I think we should:
I propose myself to do the job for two last items, and when those are ready, I would make a specific PR for iOS. What you guys think about this plan ?
I've compiled Godot and gdsqlite with ndk20 and it has ran on my device fine, but I can modify SCons to use other NDK versions and see which versions work.
The NDK version is stored in the source.properties
file for ndk11 and up. The current build system works with ndk19 and up because they support in-place toolchain usage. Versions lower than that will require using make_standalone_toolchain.py
before compiling.
I confirm that I am able to generate Android export templates with ndk20. On an other hand, it seems that in place toolchain is a better way than differenciated ones in many cases, according to Android ndk documentation. So I will start working on two next steps and make a new PR :)
make_standalone_toolchain.py
. It will also accept a pre-built toolchain with ndk_toolchain
.
Hi there ! I am testing new merged PR for android, to see if I can getting it working with fmod gdnative. Here is the project structure I use to test:
I work from OSX.
I have no problem generating bindings for OSX. Here is output for android build:
I first tried to generate bindings with:
Same problem if I set
ANDROID_NDK_ROOT
as OS environment variable and run:So I tried to compile godot engine and add its executable path in command running:
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:
(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 ;)