asmaloney / GDExtensionTemplate

📜 A template project for building Godot 4 GDExtensions using CMake
The Unlicense
218 stars 21 forks source link

Unable to find GDExtension library #60

Closed smbanasik closed 1 year ago

smbanasik commented 1 year ago

I am unable to get the example GDExtension library to work using this template. Below is the error I receive and the process I did. Let me know if I'm doing anything wrong, I'll leave any updates I find here relating to the issue.

Error message: "core/extension/gdextension.cpp:628 - No GDExtension library found for current OS and architecture (windows.x86_64) in configuration file: res://bin/GDExtensionTemplate.gdextension Failed loading resource: res://bin/GDExtensionTemplate.gdextension. Make sure resources have been imported by opening the project in the editor at least once."

How I reproduced: I'm using MSVC 2022, I downloaded the repo, placed it into the extern area, ran the 3 MSVC commands:

cmake -B GDExtensionTemplate-build -G"Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=GDExtensionTemplate-install GDExtensionTemplate cmake --build GDExtensionTemplate-build --config Release cmake --install GDExtensionTemplate-build

Then placed the GDExtensionTemplate-install folder into an empty project. When loading the empty project I received the error. I renamed the folded to 'bin' to see if being more in line with the tutorial would do anything. Adding the library to an in progress project has the same result.

smbanasik commented 1 year ago

Alright. I posted this because I thought that I had exhausted every potential fix but as it turns out, the solution is to make sure there's a debug pointer in the GDExtension file in addition to the release pointer that is generated from the above commands. Error on my part. Thanks!