![how to install xerces on windows visual studio how to install xerces on windows visual studio](https://www.codeproject.com/KB/XML/xercesc_visualcpp/ExplorerWithSubversionExternals.png)
To inform CMake about the xerces library file, I tried link_directories("C:\\Xerces\\xerces-c-3.2.2\\xerces-c-3.2.2\\src\\Release") (Yes, I know I should use the absolute paths as arguments to CMake, but that should not be the point here.) The CMakeLists.txt in the subdirectory is cmake_minimum_required (VERSION 3.8)Īdd_executable(SAXPrint "SAXPrint.cpp" "SAXPrint.hpp") So my top-level CMakeLists.txt (without linking) is: cmake_minimum_required (VERSION 3.8)
#How to install xerces on windows visual studio how to
The problem is how to tell CMake about the Xerces library files (with xerces-c-3.2.2, there seems to be the only one library file xerces-c_3.lib). For using Clang, one has to use CMake in the current version of Visual Studio ( I would prefer CMake anyway, for other reasons), and I could not figure out how to setup the project with CMake correctly.
![how to install xerces on windows visual studio how to install xerces on windows visual studio](https://i.ytimg.com/vi/3tlGFnuVssM/hqdefault.jpg)
On, it was suggested to use Clang as a compiler, as the mentioned "MSB6006" error should be a compiler bug that has not been fixed by Microsoft yet. After the build of xerces-c-3.2.2, I get the files xerces-c_3.exp, xerces-c_3.lib, and xerces-c_3_2.dll in C:\Xerces\xerces-c-3.2.2\src\Release, and the include files are in C:\Xerces\xerces-c-3.2.2\xerces-c-3.2.2\src.
![how to install xerces on windows visual studio how to install xerces on windows visual studio](https://i.ytimg.com/vi/M6XXmdEh1QM/maxresdefault.jpg)
Note: I have built xerces-c-3.2.2 myself, as there are no binaries for it available. When trying the same with xerces-c-3.2.2 and the according sample, I get the 'error MSB6006: "CL.exe" exited with code 2'. I am trying to use xerces-c-3.2.2 on Windows 10 from the sample in xerces-c-3.2.2\samples\src\SAXPrint, the sample used as a Visual Studio 2019 project.īefore, I used xerces-c_2_8_0 successfully with xerces-c-src_2_8_0\samples\SAX2Print as a Visual Studio 2019 project with Visual Studio configurations (not CMake).