Skip to content

Commit

Permalink
clink.pl: fix libexpatd.lib link error when using MSVC
Browse files Browse the repository at this point in the history
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 <jeffhost@microsoft.com>
  • Loading branch information
jeffhostetler authored and dscho committed Sep 24, 2024
1 parent d20c71f commit d0963a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compat/vcbuild/scripts/clink.pl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@
}
push(@args, $lib);
} elsif ("$arg" eq "-lexpat") {
if ($is_debug) {
push(@args, "libexpatd.lib");
} else {
push(@args, "libexpat.lib");
}
} elsif ("$arg" =~ /^-L/ && "$arg" ne "-LTCG") {
$arg =~ s/^-L/-LIBPATH:/;
push(@lflags, $arg);
Expand Down

0 comments on commit d0963a2

Please sign in to comment.