Godot Version
4.6.1
I keep having trouble using CMake to build a GDExtension.
I’m trying to get an extension to build using CMake and scons, however CMake behaves unpredictably. Before I’ve had it where suddenly CMake would stop working with a message of
Cannot generate into /home/jordan/Code/CPP/gd_one/godot-cpp-template
It was created with incompatible generator 'Unix Makefiles'
Please either delete it manually or select another generation director
When it had been working the day before, and now today I added some code, checked that things were working. And then decided to try and adjust the SConstruct file to try and get things to build and work using scons as well. However after the failed scons build, the CMake project no longer works. It compiles, but when loaded in Godot it starts throwing errors.
ERROR: Condition "!FileAccess::exists(path)" is true. Returning: ERR_FILE_NOT_FOUND
at: open_dynamic_library (drivers/unix/os_unix.cpp:1061)
ERROR: Condition "!FileAccess::exists(path)" is true. Returning: ERR_FILE_NOT_FOUND
at: open_dynamic_library (drivers/unix/os_unix.cpp:1061)
ERROR: GDExtension dynamic library not found: 'res://bin/example.gdextension'.
at: open_library (core/extension/gdextension.cpp:740)
ERROR: Error loading extension: 'res://bin/example.gdextension'.
However the loaded project does have the file:
But if I click on the file I get this error:
ERROR: drivers/unix/os_unix.cpp:1061 - Condition "!FileAccess::exists(path)" is true. Returning: ERR_FILE_NOT_FOUND
ERROR: drivers/unix/os_unix.cpp:1061 - Condition "!FileAccess::exists(path)" is true. Returning: ERR_FILE_NOT_FOUND
ERROR: GDExtension dynamic library not found: 'res://bin/example.gdextension'.
ERROR: Failed loading resource: res://bin/example.gdextension.
ERROR: editor/editor_node.cpp:1628 - Condition "res.is_null()" is true. Returning: ERR_CANT_OPEN
I checked the content of the file and it looks fine. Any idea what caused this problem? Or how I can fix it? I used git to roll back all today’s changes but the problem persists.
