Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation is resulting as error stating "The system cannot find the file specified Linking Static Library" #1618

Open
brahma0545 opened this issue Oct 8, 2024 · 3 comments
Labels
bug This has been identified as a bug needs testing

Comments

@brahma0545
Copy link

Godot version

4.2.1

godot-cpp version

4.2

System information

windows 11, Intel i7, 64bit

Issue description

I am trying to install GDExtension for my godot, i am following the https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_cpp_example.html

I have installed my "gcc" and g++ with Cygwin

gcc --version
gcc (GCC) 12.4.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\Users\india>g++ --version
g++ (GCC) 12.4.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\Users\india>scons --version
SCons by Steven Knight et al.:
SCons: v4.0.0.64fd44ef6c4ea257b065f1ba45e1c202f72e9b5f, 2020-07-04 22:47:08, by bdbaddog on ProDog2020
SCons path: ['e:\installed\anaconda3\lib\site-packages\SCons']
Copyright (c) 2001 - 2020 The SCons Foundation

after running these commands


mkdir gdextension_cpp_example
cd gdextension_cpp_example
git init
git submodule add -b 4.2 https://github.com/godotengine/godot-cpp
cd godot-cpp
git submodule update --init

I have godot-cpp folder in my project and the command

godot --dump-extension-api

produced extension_api.json

and finally, I am running the Scons

scons platform=windows custom_api_file="D:\godotNET\gdextension_cpp_example\extension_api.json"

its producing output


scons: Reading SConscript files ...

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\godotNET\gdextension_cpp_example\godot-cpp\SConstruct", line 5, in <module>
Auto-detected 12 CPU cores available for build parallelism. Using 11 cores by default. You can override it with the -j argument.
Building for architecture x86_64 on platform windows
scons: done reading SConscript files.
scons: Building targets ...
Generating gen\include\godot_cpp\core\ext_wrappers.gen.inc ...
Built-in type config: float_64
Compiling gen\src\classes\rd_pipeline_color_blend_state_attachment.cpp ...
Compiling gen\src\classes\char_fx_transform.cpp ...
Compiling gen\src\classes\input_event_mouse_button.cpp ...
Compiling gen\src\classes\editor_scene_format_importer_fbx.cpp ...
Compiling gen\src\classes\static_body3d.cpp ...
Compiling gen\src\classes\area3d.cpp ...
Compiling gen\src\classes\input_event_magnify_gesture.cpp ...
Compiling gen\src\classes\csg_combiner3d.cpp ...
Compiling gen\src\classes\texture2d.cpp ...
Compiling gen\src\classes\class_db_singleton.cpp ...
.
.
. <and many other files>

and finally its showing

Linking Static Library bin\libgodot-cpp.windows.template_debug.x86_64.a ...
scons: *** [bin\libgodot-cpp.windows.template_debug.x86_64.a] The system cannot find the file specified
scons: building terminated because of errors.

not sure what i am missing is it the documentation wrong or something with the scons build file?

Note: I am not using any Visual Studio or VS code

Steps to reproduce

mkdir gdextension_cpp_example
cd gdextension_cpp_example
git init
git submodule add -b 4.2 https://github.com/godotengine/godot-cpp
cd godot-cpp
git submodule update --init
godot --dump-extension-api
scons platform=windows custom_api_file="\gdextension_cpp_example\extension_api.json"

Minimal reproduction project

we can follow the same thinghttps://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_cpp_example.html

@brahma0545
Copy link
Author

even though the object files are getting created in the scr/classes folder, but the "libgodot-cpp.windows.template_debug.x86_64.a" is not getting created

    new file:   src/classes/editor_plugin_registration.windows.template_debug.x86_64.o
    new file:   src/classes/low_level.windows.template_debug.x86_64.o
    new file:   src/classes/wrapped.windows.template_debug.x86_64.o
    new file:   src/core/class_db.windows.template_debug.x86_64.o
    new file:   src/core/error_macros.windows.template_debug.x86_64.o
    new file:   src/core/memory.windows.template_debug.x86_64.o
    new file:   src/core/method_bind.windows.template_debug.x86_64.o
    new file:   src/core/object.windows.template_debug.x86_64.o
    new file:   src/godot.windows.template_debug.x86_64.o
    new file:   src/variant/aabb.windows.template_debug.x86_64.o
    new file:   src/variant/basis.windows.template_debug.x86_64.o
    new file:   src/variant/callable_custom.windows.template_debug.x86_64.o
    new file:   src/variant/callable_method_pointer.windows.template_debug.x86_64.o
    new file:   src/variant/char_string.windows.template_debug.x86_64.o
    new file:   src/variant/color.windows.template_debug.x86_64.o
    new file:   src/variant/packed_arrays.windows.template_debug.x86_64.o
    new file:   src/variant/plane.windows.template_debug.x86_64.o
    new file:   src/variant/projection.windows.template_debug.x86_64.o
    new file:   src/variant/quaternion.windows.template_debug.x86_64.o
    new file:   src/variant/rect2.windows.template_debug.x86_64.o
    new file:   src/variant/rect2i.windows.template_debug.x86_64.o
    new file:   src/variant/transform2d.windows.template_debug.x86_64.o
    new file:   src/variant/transform3d.windows.template_debug.x86_64.o
    new file:   src/variant/variant.windows.template_debug.x86_64.o
    new file:   src/variant/vector2.windows.template_debug.x86_64.o
    new file:   src/variant/vector2i.windows.template_debug.x86_64.o
    new file:   src/variant/vector3.windows.template_debug.x86_64.o
    new file:   src/variant/vector3i.windows.template_debug.x86_64.o
    new file:   src/variant/vector4.windows.template_debug.x86_64.o
    new file:   src/variant/vector4i.windows.template_debug.x86_64.o

@cosparks
Copy link

I have tried a couple times now and have not been able to reproduce this.

scons v4.6, minggw v12.2, windows 10

@dsnopek
Copy link
Collaborator

dsnopek commented Oct 29, 2024

Are you sure that it's using gcc/g++?

If you have MSVC installed, and don't pass the use_mingw=yes argument to scons, then it'll use MSVC.

Can you try adding that argument? Or, you could add verbose=yes, and it'll print out the command it's running, which should make it clear which compiler it's using.

@dsnopek dsnopek added bug This has been identified as a bug needs testing labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This has been identified as a bug needs testing
Projects
None yet
Development

No branches or pull requests

3 participants