Compiling LibXml2 for Windows

Short descriptions on how to use the SDK, the build environment and giving hints on some tricky issues.
Post Reply
User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Compiling LibXml2 for Windows

Post by Support Team »

To compile LibXml2 on your own, e.g. because there is a new version, just follow the step by step instructions below. The method to compile LibXml2 shown here is an example for Windows using Visual Studio.

Work Order Instructions:
  1. download the source of latest stable release of LibXml2
  2. build the third party library (32bit or 64bit)
    Note: use the same Visual Studio or compiler as for the SDK compilation
  3. copy the third party files to the ThirdParty folder within the SDK folder structure
    Note: use the suggestes subfolder names: win32 and win64 (see section Third-Party components - Important note for Windows)
  4. use CMake to generate new Visual Studio solution file for the SDK
  5. recompile solution
Creating and Compiling Visual Studio NMake Makefiles (Release):
  1. Start your Visual Studio Command Prompt and navigate to the unzipped LibXml2 folder (for 64Bit start the x64 Win64 Command Prompt).
  2. Navigate into the folder win32 and enter the following command to create the Makefiles without patent-registered algorithms in debug mode:Makefiles with:

    Code: Select all

    cscript configure.js compiler=msvc prefix=c:opt include=c:optinclude lib=c:optlib iconv=no debug=no
  3. Compile with nmake /f Makefile.msvc clean all install.
Creating and Compiling Visual Studio NMake Makefiles (Debug):
  1. Start your Visual Studio Command Prompt and locate the unzipped LibXml2 folder (for 64Bit start the x64 Win64 Command Prompt).
  2. Now locate the makefile "Makefile.msvc" (in folder win32) and edit the following lines:

    Code: Select all

    XML_SO = $(XML_BASENAME)d.dll
    XML_IMP = $(XML_BASENAME)d.dll
  3. Navigate into the folder win32 and enter the following command to create the Makefiles without patent-registered algorithms in debug mode:

    Code: Select all

    cscript configure.js compiler=msvc prefix=c:\opt include=c:\opt\include lib=c:\opt\lib iconv=no debug=yes cruntime=/MDd vcmanifest=yes
  4. Compile with nmake /f Makefile.msvc clean all install.
Best regards
Unified Automation Support Team

Post Reply