Skip to content

Errors when running commands described in GDExtensions C++ tutorial #7916

Open
@njelly

Description

@njelly

Your Godot version:
4.1

Issue description:
GDExtension documentation commands lead to errors

URL to the documentation page:
https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_cpp_example.html#doc-gdextension-cpp-example

I have followed these instructions up to this command:
scons platform=<platform> -j4 custom_api_file=<PATH_TO_FILE>

It gives the following output:

C:\[REDACTED]\gdextension_cpp_example\godot-cpp>scons platform=windows -j4 custom_api_file="C:\[REDACTED]\gdextension_cpp_example\godot-cpp\extension_api.json"
scons: Reading SConscript files ...
Building for architecture x86_64 on platform windows
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src\godot.windows.template_debug.x86_64.o -c -std=c++17 -Wwrite-strings -O2 -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igdextension -Iinclude -Igen\include src\godot.cpp
g++ -o src\classes\editor_plugin.windows.template_debug.x86_64.o -c -std=c++17 -Wwrite-strings -O2 -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igdextension -Iinclude -Igen\include src\classes\editor_plugin.cpp
scons: *** [src\godot.windows.template_debug.x86_64.o] The system cannot find the file specified
g++ -o src\classes\low_level.windows.template_debug.x86_64.o -c -std=c++17 -Wwrite-strings -O2 -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igdextension -Iinclude -Igen\include src\classes\low_level.cpp
g++ -o src\classes\wrapped.windows.template_debug.x86_64.o -c -std=c++17 -Wwrite-strings -O2 -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igdextension -Iinclude -Igen\include src\classes\wrapped.cpp
scons: *** [src\classes\editor_plugin.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [src\classes\wrapped.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [src\classes\low_level.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: building terminated because of errors.

I have spent the time to make sure scons, cl, godot, etc., are all present in my Path.

EDIT: adding bits=64 to the command does not fix the error

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:manualIssues and PRs related to the Manual/Tutorials section of the documentationbugtopic:gdextension

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions