SF Project

Release Info

Known Issues
Build Instructions

API Docs


XML-Security-C is currently supported on Linux and Solaris. It has been built and tested using GNU gcc 2.95.4 and GNU make.

Note The UNIX XML-Security-C build process has changed radically since beta 0.0.2 as the Makefiles and configure scripts have been completely rewritten.
Set up the Environment

The build process has been automated as much as possible. To start the process, three environment variables can be set :

  • XERCESCROOT - points to the base of your Xerces distribution
  • XALANCROOT - points to the base of your Xalan distribution
  • OPENSSL - points to the base of your OpenSSL distribution

For example (on my Debian Linux box under Bash) :

export XERCESCROOT=~/prog/extlibs/xerces-c-src2_1_0
export XALANCROOT=~/prog/extlibs/xalan-c-src1_4/c
export OPENSSL=~/prog/extlibs/openssl-0.9.6g

If these environment variables are not set, configure will try to find the necessary include and library files in the system directories. The configure script is created through autoconf so you can also tell your compiler where to find these things via the CXXFLAGS and LDFLAGS environment variables.

If configure cannot find anything for Xalan, it will assume that you are not interested in XPath or XSLT support and will compile XSEC without linking to Xalan. Any attempt to use these features will raise an exception in the library.


Now go to the $XSECCROOT/src directory and run the command ./configure. This will create the necessary makefiles and header files necessary to build the package.

In addition to the standard options, configure can be passed a number of XSEC specific options :

  • --without-xalan disable linkage to Xalan.
  • --enable-debug cause the library to be built with symbols
Note Using the --without-xalan option will automatically mean that the library does not support XPath or XSLT transformations (although envelope transforms will work as the library can now perform these without going through an XPath transform).


Assuming the output of the above command looks reasonable simply type make (or gmake - you must use the GNU make utility) in the src directory. This will make the shared library. In addition, make tools will make the tools (or examples) in the src/tools directory.

The make process will create three directories in the distribution directory:

  1. include - All public header files are copied here
  2. bin - Where the tools are placed once compiles
  3. lib - Where the shared library is place

You will need to set up your LD_LIBRARY_PATH environment variable to ensure will find the new shared libraries.

Finally - you can use make clean and make distclean to remove all binaries and libraries (former) and build scripts (latter)


The new makefiles do not support a make install process. This will be enabled in the next version of the library.


XML-Security-C has been built and tested on Microsoft's Visual C++ 6.0 compiler only. (VC++ .NET support is currently being worked on.) The following subsections briefly describe how to rebuild the library, tools and samples using the supplied workspaces.

Setup Directories

The workspace and project files provided do not make any assumptions about where Xerces, Xalan or OpenSSL might be on the system. The first step is therefore to configure VC directories under Tools->Options (Directories).

For the Include directories you will need something similar to my setup below (replacing D:\PROG\CLIB\.. with the appropriate path on your system).

Similarly the library directories will need to be added to. Note that in the example below, I use both Debug and Release libraries for Xalan and Xerces. As provided, the workspace projects link to the debug libraries for XSEC Debug and Release for XSEC Release.

Build Library and Tools

The main workspace is found in :


You can load this to build the tools or the library using the relevant project. (The library is xsec_lib.)

Samples can be built using the workspace found in :


All output will be sent to


for the debug builds and Release for the release.

Building Without Xalan

If you wish to build the library without Xalan (and thus without XPath and XSLT support), simply use the "...No Xalan" project settings. I.e. Win32 Debug No Xalan and Win32 Release No Xalan.

You will also need to uncomment the #define XSEC_NO_XALAN line in src/framework/XSECW32Config.hpp file Logo
Copyright © Berin Lautenbach. All Rights Reserved.