Building Xerces-C++ XML Parser for EMMe
This article applies to the following versions | |||
Platform | MinGW | MSYS | |
---|---|---|---|
Windows XP SP3 | most recent packages as of 2010-06-14 | most recent packages as of 2010-06-14 | |
Status: up to date |
Related Articles |
---|
Eclipse, CDT & MingW & MSYS Setup Guide |
HowTo: Install MSYS and MinGW for use with Eclipse CDT |
This is a step-by-step guide to build Xerces-C++ XML Parser libraries in a Win XP environment configured for use of Eclipse CDT, MSYS & MinGW (EMMe)
Preparatory Steps
As software versions may change over time, <version> will be used in the guide as a placeholder for the current version number as listed in the Intended for Software Versions section. For example, if xerces-c-3.1.1.tar.gz is the current software version, then the guide may tell you to
- unpack xerces-c-<version>.tar.gz
Prerequisites & Disk Space
You will need a file archiving software capable of uncompressing gz and tar files. If you build in the EMMe environment, you should have tar and gzip available on the MSYS console and do not need any other software.
One free software solution is 7-zip (windows executable) direct link.
The build of xerces-c takes up about 117MB on your hard disk. During the installation process you will need about 465MB of free hard disk space.
Intended for Software Versions
To be used only with the following software versions freely available on the web, other versions may or may not work:
Eclipse CDT, MSYS & MinGW environment (EMMe) (1) - all version according to Eclipse, CDT & MingW & MSYS Setup Guide) xerces-c-3.1.1.tar.gz [1] direct link (2a) - 5MB
Building Xerces-C Libraries
- copy xerces-c-<version>.tar.gz to your mingw directory (e.g. "C:\mingw")
- open an MSYS console. Start menu > MinGW > MinGW Shell
- execute the following commands
cd /mingw/ tar -xf xerces-c-<version>.tar.gz cd xerces-c-<version> mkdir build cd build
- configure xerces for the build (modify configure options to suit your needs)
../configure --prefix=/mingw/ LDFLAGS=-no-undefined --disable-pretty-make
- build the libraries
make make install
Including Xerces-C in your Eclipse project
- start Eclipse, select the project which you would like to use Xerces-C
- Project -> Properties
In the "Properties for (project name)" window
- select and then expand "C/C++ Build" in the list on the left (double click or select the "+")
On the left side, in the expanded C/C++ Build section
- select "Settings"
In the "Settings" -> "Tool settings", on the left side
- select the "GCC C++ Linker" -> "Libraries"
On the right side, next to "Libraries (-l)",
- click on the little document icon with a green "+" on it to add a library
In the "Enter Value" window,
- enter
xerces-c
- select "OK"
- select "OK" again to close Project Properties
Done.