Help with building GDNative / C++ for Android

HarizioHarizio Posts: 1Member

Hello, I'm currently having troubles getting started with a C++ Android project in Godot.

I was able to build the cpp bindings for windows and get the C++ code built and implemented into Godot via a ".dll" file, but I can't figure out the process for Android. Currently The C++ code I have doesn't do much more than just move a sprite but it works perfectly both within the editor and a Windows build. However when I export for android, the apk exports and runs fine but seems to be missing the C++ scripts.

I think I'm somehow supposed to build a separate ".so" file to be included in the gdnlib file when exporting to Android but I can't quite figure it out.

Also am I supposed to build different cpp bindings for android in SCons? I tried setting "platform=android" but it was invalid and only listed windows, linux and ios as valid options.

If anyone has any tips or previous experience in implementing C++ into an Android project in Godot I would greatly appreciate it.


  • Develop3DDevelop3D Posts: 4Member

    The only thing i can say for shure is, you cannot add a dll to an Android-build. It has to be a static lib directly compiled into the sources. Same with HTML5.

    Unfortunately i am having the same trouble while trying to compile a HTML5 version with a custom c++ module. And i havent found any hint or support on how to make it work yet.
    So currently it seems to be not an option to use C++ in any way for mobile or browser output. Sad enough.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file