Skip to content

Declare XMLPUBVAR as extern for clang-cl

hhb requested to merge hhb/libxml2:patch-1 into master

"The use of dllexport implies a definition, while dllimport implies a declaration. You must use the extern keyword with dllexport to force a declaration; otherwise, a definition is implied." [1]

This code compiles on MSVC. But with clang-cl, it failed because of duplicated symbols.

[1] https://docs.microsoft.com/en-us/cpp/cpp/definitions-and-declarations-cpp

Merge request reports