diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/analyze.cpp | 4 | ||||
| -rw-r--r-- | src/os.hpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index e0d34be281..b20b7b3bd7 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3189,6 +3189,8 @@ ImportTableEntry *add_source_file(CodeGen *g, PackageTableEntry *package, Buf *a if (is_pub) { if (buf_eql_str(proto_name, "main")) { g->have_pub_main = true; + g->windows_subsystem_windows = false; + g->windows_subsystem_console = true; } else if (buf_eql_str(proto_name, "panic")) { g->have_pub_panic = true; } @@ -3196,6 +3198,8 @@ ImportTableEntry *add_source_file(CodeGen *g, PackageTableEntry *package, Buf *a g->libc_link_lib != nullptr) { g->have_c_main = true; + g->windows_subsystem_windows = false; + g->windows_subsystem_console = true; } } diff --git a/src/os.hpp b/src/os.hpp index 2aefad4fa8..0d4e8d3dba 100644 --- a/src/os.hpp +++ b/src/os.hpp @@ -81,7 +81,7 @@ bool os_is_sep(uint8_t c); #endif #if defined(ZIG_OS_WINDOWS) -#define ZIG_PRI_usize "Iu" +#define ZIG_PRI_usize "I64u" #define ZIG_PRI_u64 "I64u" #define ZIG_PRI_llu "I64u" #define ZIG_PRI_x64 "I64x" |
