Skip to content

Visual Studio Community ‐ Building the gdextension

PixelRain edited this page Aug 28, 2024 · 6 revisions

Run a build from VS Community with: Build > Build All (you can check the shortkey yourself since it may differ)

CMakeLists.txt should have configured the build for your compiler. The gdextension will be built as a .dll.

The .dll gets placed in \project\bin\, it is later referenced by the godot project through \project\roguelite.gdextension

This is thanks to the CMake tools add-on, and the project being in the same directory as CMakeLists.txt

With how the CMakeLists.txt is written right now, the .dll will be built for the system we are running on. Note (not included in godot-roguelite setup): You can have CMake generate binaries for other platforms through things called cross compilers it's easier to set that up on Linux though since most of the tools you need are simple packages to install.

Unfortunately, since this project takes a gdextension approach to building as opposed to godot modules, the resulting gdextension .dll will always be lying around even after exporting the godot project, managing this fact will be up to you.

A gdextension currently cannot be built as a static library embedded into the .exe