Page 1 of 1

Unresolved external link symbols for libxml2 compiling with x64

Posted: 05 Mar 2023, 16:14
by Robert Asher
We've built our 32-bit OPC UA client successfully for a while now, but need to rebuild it targeting x64.
When we do that, we get 36 unresolved external symbol __imp_xml errors.
LNK2001 unresolved external symbol __imp_xmlGetLastError
...
LNK2019 unresolved external symbol __imp_xmlFree

It looks like there's some type of name mangling issue when x64 is target.
We tried using the suggestion on this forum article:

https://forum.unified-automation.com/viewtopic.php?f=18&t=7798&p=12416&hilit=libxml2#p12416
The ONLY thing you have to do is starting the correct Visual Studio Command Prompt -
For 32-bit: x86 Native Tools Command Prompt for VS XXXX
For 64-bit: x64 Native Tools Command Prompt for VS XXXX

Anyone have a suggestion?
Thanks,
Robert