0 votes

i am new to working with gdnative and c++
and in the .gdnlib file you must provide libs for all kinds of platforms
but i have a problem; i am using linux(distro: pop os running on kde plasma) and cmake to compile c++ code
and in cmake the generated lib from the cmake command addlibrary(godotproject SHARED ${source_files}) is a .so lib
and in the .gdnlib file for it to work in windows and osx and android and ios you must provide a .dll and .dylib and ... libs for it to work in other platform

so how can i compile c++ code in cmake for other platforms(windows and osx and android and ios)

i am a big fan of godot and i dont want to move to UE4 for such a problem

so please any help; i will be thankful

Godot version 3.2
in Engine by (70 points)
edited by

Keep in mind that GDNative isn't supported on IOS, see here: https://github.com/godotengine/godot-cpp/tree/3.2#ios

thank you for your comment

They say it's still possible with static linking on ios.

Hi! I'm a bit late, but I managed to cross-compile the Godot gdnative stuff using cmake from linux to windows with mingw, you can take a look at my project here, and that is how I do it with an additional file mingw-w64-x86_64.cmake I found on the internet, you can take a look at the bash script build_windows.sh

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.