You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I am pretty new to Godot, though I do know CMake and C++ pretty well. I went through the official gdextension docs for scons, and then later found this project. I managed to get this project building out of the box, no problem. The question I have is where does this go in relation to my Godot project files? The setup instructions in the readme don't quite tell me that part (or at least I missed it).
Everything compiles fine and installs fine with that. The problem is I can't seem to get Godot to find or import the extension.
Can you advise on how to create a working Godot project with this? Do I need to edit my project file? Or add this extension via the project plugin list somehow?
Also, is it possible to use this repo for multiple (unrelated) C++ extensions in the same Godot project? How does the folder structure change in that case?
Maybe consider extending the readme or adding a wiki article?
Thanks!
The text was updated successfully, but these errors were encountered:
Ok. After poking around with this more I wound up having to tweak a couple things to get this to build and load for me in Godot 4.3 under MSVC 2022 on Windows 10:
# checkout the C++ bindings to match Godot 4.3cd extern/godot-cpp
git checkout 4.3
# fix cmake issue with unquoted variables near line 100
vim extern/godot-cpp/CMakeLists.txt
- string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})+ string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
# disable warnings-as-errors
vim cmake/CompilerWarnings.cmake
-option( ${PROJECT_NAME_UPPERCASE}_WARNING_AS_ERROR "Treat warnings as errors" ON )+option( ${PROJECT_NAME_UPPERCASE}_WARNING_AS_ERROR "Treat warnings as errors" OFF )
# Godot won't load the gdextension unless I edit this file
vim MyPlugin.gdextension
- linux.release.x86_64 = "lib/Linux-x86_64/libMyPlugin.so"- windows.release.x86_64 = "lib/Windows-AMD64/MyPlugin.dll"+ linux.x86_64 = "lib/Linux-x86_64/libMyPlugin.so"+ windows.x86_64 = "lib/Windows-AMD64/MyPlugin.dll"
So I am pretty new to Godot, though I do know CMake and C++ pretty well. I went through the official gdextension docs for scons, and then later found this project. I managed to get this project building out of the box, no problem. The question I have is where does this go in relation to my Godot project files? The setup instructions in the readme don't quite tell me that part (or at least I missed it).
After inspecting https://github.com/nathanfranke/gdextension, I made some guesses and attempted to structure things like the following:
By using the following build commands:
Everything compiles fine and installs fine with that. The problem is I can't seem to get Godot to find or import the extension.
Can you advise on how to create a working Godot project with this? Do I need to edit my project file? Or add this extension via the project plugin list somehow?
Also, is it possible to use this repo for multiple (unrelated) C++ extensions in the same Godot project? How does the folder structure change in that case?
Maybe consider extending the readme or adding a wiki article?
Thanks!
The text was updated successfully, but these errors were encountered: