From: LeonardoBizzoni Date: Sat, 23 Aug 2025 16:04:43 +0000 (+0200) Subject: [Win32] Fixed cmdline max path X-Git-Url: http://git.leonardobizzoni.com/?a=commitdiff_plain;h=091b58865ea0754637146d11bd000cfe19ad40f1;p=CBuild [Win32] Fixed cmdline max path --- diff --git a/cbuild.h b/cbuild.h index fba557c..e0b1212 100755 --- 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], "\\") diff --git a/examples/01-basics/build.c b/examples/01-basics/build.c index 53535de..31be747 100755 --- a/examples/01-basics/build.c +++ b/examples/01-basics/build.c @@ -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