From 37e43b673f8c8aa160efad17df8ed3aaf6a73a42 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Sun, 1 Mar 2026 17:50:18 +0100 Subject: [PATCH] windows build fixes --- implementations/Crafter.Build-Command.cpp | 6 +----- implementations/Crafter.Build-Project.cpp | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/implementations/Crafter.Build-Command.cpp b/implementations/Crafter.Build-Command.cpp index 1831ae2..bd41330 100644 --- a/implementations/Crafter.Build-Command.cpp +++ b/implementations/Crafter.Build-Command.cpp @@ -152,15 +152,11 @@ namespace Crafter { if(!fs::exists(stdPcm) || fs::last_write_time(stdPcm) < fs::last_write_time(sourceFilePath)) { fs::copy(sourceFilePath, stdcppm, fs::copy_options::overwrite_existing); - std::string result = RunCommand(std::format("cd {}\\{} && \"{} && clang-cl.exe /EHsc /MD /std:c++latest --target=x86_64-pc-windows-msvc -Wno-include-angled-in-module-purview -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile std.cppm -o std.pcm", exeDir.string(), config.target, vsVars, stdPcm)); + std::string result = RunCommand(std::format("cd {}\\{} && {} && clang-cl.exe /EHsc /MD /std:c++latest --target=x86_64-pc-windows-msvc -Wno-include-angled-in-module-purview -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile std.cppm -o std.pcm", exeDir.string(), config.target, vsVars, stdPcm)); if(result != "") { - std::cout << result << std::endl; throw std::runtime_error(result); } result = RunCommand(std::format("cd {}\\{} && {} && cl.exe /std:c++latest /EHsc /nologo /W4 /MD /c \"{}\"", exeDir.string(), config.target, vsVars, sourceFilePath)); - std::cout << std::format("cd {}\\{} && {} && cl.exe /std:c++latest /EHsc /nologo /W4 /MD /c \"{}\"", exeDir.string(), config.target, vsVars, sourceFilePath) << std::endl; - std::cout << result << std::endl; - std::cout << "hello?" << std::endl; } } diff --git a/implementations/Crafter.Build-Project.cpp b/implementations/Crafter.Build-Project.cpp index 337b4ec..95fd2e4 100644 --- a/implementations/Crafter.Build-Project.cpp +++ b/implementations/Crafter.Build-Project.cpp @@ -470,7 +470,7 @@ namespace Crafter { libPath += std::format(" /LIBPATH:{}", lib); } - buildResult.errors = RunCommand(std::format("{} && link.exe {} {} {}\\{}\\std.o msvcrt.lib kernel32.lib user32.lib /OUT:{}.exe", vsVars, libPath, files, exeDir.string(), config.target, (binDir/outputName).string())); + buildResult.errors = RunCommand(std::format("{} && link.exe {} {} {}\\{}\\std.obj msvcrt.lib kernel32.lib user32.lib /OUT:{}.exe", vsVars, libPath, files, exeDir.string(), config.target, (binDir/outputName).string())); #endif } else if(config.type == CRAFTER_CONFIGURATION_TYPE_LIBRARY) { #ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu