Linking with Xerces 2.8.0 statically

February 12, 2008 at 10:33 PMAmer Gerzic

Couple of weeks ago, I needed to parse a set of XML files. As always, my first thought was to search the web for free XML parsers. But then I remembered that I found a solution in the past: Xerces XML parser. Even though, xerces was originally written in Java, there is an excellent port to c/c++. Xerces was developed by Apachi Software Foundation, and it supports wide range of compilers. To use it with Visual Studio 2005 C++ compiler, following steps are required:

  1. Download compiler in binary form from here;
  2. Unpack into any folder; This step will create subfolders include and lib;
  3. Add path include and lib folders to VC++ directories;
  4. To statically link to a project, link with xerces-c_static_2.lib or (xerces-c_static_2D.lib for debug version);
  5. Set to ignore libcmt.lib

Steps 4 and 5 are shown in the screen shot below:

 

Posted in: CPP

Tags: , , , , , ,