godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.69k stars 512 forks source link

how to fix scons error "[src\core\AABB.o] the system cannot find the file specified" on visual studio command prompt #586

Open Onganne opened 3 years ago

Onganne commented 3 years ago

I am using visual studio command prompt to run scons of godot cpp, but the error, like the title suggests, appears and I am lost on what to do of it.

I tried researching ones again, but to no avail, the error is just too general for me to figure it out. I am also a beginner so a beginner friendly advise will really help so that the godot cpp scons will run and make file on designated area (according to the video and insturction) thx c:

Calinou commented 3 years ago

Can you paste the complete error message here? This may be a duplicate of https://github.com/godotengine/godot-cpp/issues/465.

Onganne commented 3 years ago

Oh! Its u once again c: Hello! N0w I feel embarassed...but thx for responding and helping c:

Here is the full weird error

C:\Users\User\SimpleLibrary\godot-cpp>scons use_mingw=yes platform=windows generate_bindings=yes scons: Reading SConscript files ... src\gen: File exists src\gen: File exists scons: done reading SConscript files. scons: Building targets ... g++ -o src\core\AABB.o -c -O3 -std=c++14 -Wwrite-strings -I. -Igodot-headers -Iinclude -Iinclude\gen -Iinclude\core src\core\AABB.cpp scons: *** [src\core\AABB.o] The system cannot find the file specified scons: building terminated because of errors.

C:\Users\User\SimpleLibrary\godot-cpp> [src\core\AABB.o] The system cannot find the file specifie [src\core\AABB.o] The system cannot find the file specifie [src\core\AABB.o] The system cannot find the file specifie [src\core\AABB.o] The system cannot find the file specifie

Very COnfusing as u can see But Thx Again Very Much!

Onganne commented 3 years ago

I realized that this may NOT be a duplicate of the one you recongnize THis is due to the error itself

Hope to get a reply, thx c:

Calinou commented 3 years ago

I realized that this may NOT be a duplicate of the one you recongnize THis is due to the error itself

Hope to get a reply, thx c:

Sorry, I don't know what could be causing this.

Onganne commented 3 years ago

It is okay, its not like all errors are understandable Especially this one..hehe scons: *** [src\core\AABB.o] The system cannot find the file specified

If I may get a clue to why this error exist it can help I am using VisualStudio 2019 and using the command prompt in it

(just giving information if it can help hehe)

THen followed the instruction of the godot cpp and the other one (the old issue u solved for me, thx again)

So my question is instead, what does the error mean? Like what does [src\core\AABB.o] mean? It seems to be a file that cannot be found for some reason

Any Advise or Information can help Thx Again!

Onganne commented 3 years ago

welp, its been a long month of trial and error and I have yet to find the problem this is not good If anyone else can help please let me now! I will still be trying to find an answer to this problem

BeytoA commented 2 years ago

For me, Windows 64-bit library gets successfully built with cl, installed with VS2017. But, I get this exact same error if I don't want to use cl.exe and use "use_mingw=True" with the scons command. This might be mingw64.exe and g++ related. On the Windows machine I tested, mingw64 is installed with the MSYS2.

Denmey commented 2 years ago

For me, Windows 64-bit library gets successfully built with cl, installed with VS2017. But, I get this exact same error if I don't want to use cl.exe and use "use_mingw=True" with the scons command. This might be mingw64.exe and g++ related. On the Windows machine I tested, mingw64 is installed with the MSYS2.

Run into this too, error from scons is a bit misleading by some reason. It turned out that I didn't have g++ on my MSYS2 environment. Check that gcc package is installed in your MSYS2 MinGW64.

Notarium commented 1 year ago

I encountered this problem as well, please check if you're using preview version of visual studio, vswhere.exe won't return preview version of vs by default.

Structed commented 1 month ago

I encountered this problem as well, please check if you're using preview version of visual studio, vswhere.exe won't return preview version of vs by default.

Thank you for this hint! Installing a non-preview Visual Studio 2022 did the trick for me.

Although, my error message was a little bit different:

Generating godot-cpp\gen\include\godot_cpp\core\ext_wrappers.gen.inc ...
Built-in type config: float_64
Compiling godot-cpp\src\core\memory.cpp ...
Compiling shared src\Log.cpp ...
scons: *** [godot-cpp\src\core\memory.windows.template_debug.x86_64.o] The system cannot find the file specified
brahma0545 commented 1 month ago

I encountered this problem as well, please check if you're using preview version of visual studio, vswhere.exe won't return preview version of vs by default.

Thank you for this hint! Installing a non-preview Visual Studio 2022 did the trick for me.

Although, my error message was a little bit different:

Generating godot-cpp\gen\include\godot_cpp\core\ext_wrappers.gen.inc ...
Built-in type config: float_64
Compiling godot-cpp\src\core\memory.cpp ...
Compiling shared src\Log.cpp ...
scons: *** [godot-cpp\src\core\memory.windows.template_debug.x86_64.o] The system cannot find the file specified

I ran into the same error, is there anyway to fix this?

Structed commented 1 month ago

I think this issue is unrelated to Godot and is just a PATH resolution issue on Windows with preview versions of Visual Studio. So nothing the team could fix here other than providing a workaround in this issue. It's perhaps an issue for the scons team to look into - if not the Visual Studio team.