Declare XMLPUBVAR as extern for clang-cl
"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