]> git.leonardobizzoni.com Git - CBuild/commitdiff
[Win32] Fixed cmdline max path
authorLeonardoBizzoni <leo2002714@gmail.com>
Sat, 23 Aug 2025 16:04:43 +0000 (18:04 +0200)
committerLeonardoBizzoni <leo2002714@gmail.com>
Sat, 23 Aug 2025 16:04:43 +0000 (18:04 +0200)
cbuild.h
examples/01-basics/build.c

index fba557ca202eb99b97e45fb4069c2ae4e30f6679..e0b121239d2f9e12695f198e8b87a0bed38cd020 100755 (executable)
--- a/cbuild.h
+++ b/cbuild.h
@@ -530,7 +530,7 @@ internal CB_Process _cb_run(CB_Cmd *cmd, struct CB_RunArgs args) {
   CB_Process res = {};
 
 #if OS_WINDOWS
-  char cmdline[MAX_PATH] = {};
+  char cmdline[32767] = {};
   size_t offset = 0;
   for (size_t i = 0; i < cmd->count; ++i) {
     strcat(cmdline, strstr(cmd->values[i], " ") || strstr(cmd->values[i], "\\")
index 53535dea05052cdcb68a24452fd35b3629630a89..31be747d6224d41b857e807b77d15ae6814602c1 100755 (executable)
@@ -5,7 +5,7 @@ int main(int argc, char **argv) {
 
   CB_Cmd cmd = {};
 #if OS_WINDOWS
-  cb_cmd_append(&cmd, "cl.exe", "main.c", "/Femain.exe");
+  cb_cmd_append(&cmd, "cl.exe", "main.c", "/Fe:main");
 #else
   cb_cmd_append(&cmd, "cc", "main.c", "-o", "main");
 #endif