How to explicitly state using internal expat?

I just started trying vst3sdk. However, when i tried to install vst3sdk with cmake, something about libexpat goes wrong:

vst3sdk\vstgui4\vstgui\uidescription\xmlparser.cpp(14,10): fatal
error C1083: 无法打开包括文件: “expat.h”: No such file or directory 

It’s wired because vst3sdk should have its own bundled libexpat. So it should not throw an error about missing dependency.

Then I tried installing libexpat with vcpkg and other cross-platform package managers (developers using Windows are poor sometimes about packages). Then it ended up with a linkage error:

LINK : fatal error LNK1181: 无法打开输入文件“expat.lib” 

I searched the library of expat, then I found libexpats on cross-platform pac mans are always named libexpat.lib or libexpatd.lib instead of expat.lib.

Is this a bug? Or is there any methods to explicitly state using internal expat?

This happens when cmake finds expat somewhere on the system which was not expected on Windows. This bug was already reported and fixed with this commit. You can apply this fix manually until the next version of the SDK is released.

1 Like