godotengine / godotengine/godot-cpp

Scons randomly failing on Windows, getting confused about .o files (?)

Open
#1,894 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.7k
Forks
809
Avg merge
1d 3h
Merged PRs (30d)
8

Description

### Godot version

v4.5.1-stable

### godot-cpp version

4.3

### System information

Windows 11

### Issue description

I cloned the [template project](https://github.com/godotengine/godot-cpp-template) and added a class and built it once and it worked fine, showed in Godot and everything. Then I added a few methods and `scons` stopped working with no compilation or link time errors:

### Steps to reproduce

```
PS E:\gitrepos\GdVectorSvgControl> scons
scons: Reading SConscript files ...
Auto-detected 32 CPU cores available for build parallelism. Using 31 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 ...
Compiling godot-cpp\src\godot.cpp ...
Compiling godot-cpp\src\classes\editor_plugin_registration.cpp ...
Compiling godot-cpp\src\classes\low_level.cpp ...
Compiling godot-cpp\src\classes\wrapped.cpp ...
Compiling godot-cpp\src\core\class_db.cpp ...
Compiling godot-cpp\src\core\error_macros.cpp ...
Compiling godot-cpp\src\core\memory.cpp ...
Compiling godot-cpp\src\core\method_bind.cpp ...
Compiling godot-cpp\src\core\object.cpp ...
Compiling godot-cpp\src\core\print_string.cpp ...
scons: *** [godot-cpp\src\godot.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\classes\editor_plugin_registration.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\classes\low_level.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\classes\wrapped.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\class_db.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\error_macros.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\memory.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\method_bind.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\object.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\print_string.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: building terminated because of errors.
PS E:\gitrepos\GdVectorSvgControl> cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35719 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]
```

Why is it getting confused about `.o` files? This is a Windows build with MSVC installed and working. Can I tell it somehow to compile correctly or something? And why did it randomly break after working once?

### Minimal reproduction project

https://github.com/myblindy/GdVectorSvgControl

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.