Skip to content

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

@myblindy

Description

@myblindy

Godot version

v4.5.1-stable

godot-cpp version

4.3

System information

Windows 11

Issue description

I cloned the template project 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions