Skip to content

Commit 6acabd6

Browse files
committed
when linking msvcrt, also link ntdll.lib
See #2073
1 parent c845345 commit 6acabd6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/link.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,8 +1157,9 @@ static void add_nt_link_args(LinkJob *lj, bool is_library) {
11571157
//https://msdn.microsoft.com/en-us/library/bb531344.aspx
11581158
lj->args.append("legacy_stdio_definitions.lib");
11591159

1160-
// msvcrt depends on kernel32
1160+
// msvcrt depends on kernel32 and ntdll
11611161
lj->args.append("kernel32.lib");
1162+
lj->args.append("ntdll.lib");
11621163
} else {
11631164
lj->args.append("/NODEFAULTLIB");
11641165
if (!is_library) {

0 commit comments

Comments
 (0)