Skip to content

Commit 16652bc

Browse files
jeffhostetlerdscho
authored andcommitted
clink.pl: fix libexpatd.lib link error when using MSVC
When building with `make MSVC=1 DEBUG=1`, link to `libexpatd.lib` rather than `libexpat.lib`. It appears that the `vcpkg` package for "libexpat" has changed and now creates `libexpatd.lib` for debug mode builds. Previously, both debug and release builds created a ".lib" with the same basename. Signed-off-by: Jeff Hostetler <[email protected]>
1 parent 7927f94 commit 16652bc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compat/vcbuild/scripts/clink.pl

+4
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@
6666
}
6767
push(@args, $lib);
6868
} elsif ("$arg" eq "-lexpat") {
69+
if ($is_debug) {
70+
push(@args, "libexpatd.lib");
71+
} else {
6972
push(@args, "libexpat.lib");
73+
}
7074
} elsif ("$arg" =~ /^-L/ && "$arg" ne "-LTCG") {
7175
$arg =~ s/^-L/-LIBPATH:/;
7276
push(@lflags, $arg);

0 commit comments

Comments
 (0)