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 22, 2022
1 parent 4bb5153 commit cce1b40
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compat/vcbuild/scripts/clink.pl
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 cce1b40

Please sign in to comment.