C++ UA Server SDK  1.5.1.326
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Cross Compiling LibXml2

The following sections describe how to cross compile LibXml2 for Linux on ARM.

Requirements

You need a toolchain to cross compile for your target system.

Download and Unpack LibXml2

Download the most recent version of LibXml2 from http://xmlsoft.org/downloads.html and unpack it:

tar -xvzf libxml2-<version>.tar.gz

Set Environment Variables

First we have to set the environment variables CC and CXX to our cross compiler:

export CC=/usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gcc
export CXX=/usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-g++

Configure

Now we configure the makefiles. We’re specifying that we want to compile for Linux on ARM, disabling iconv support and python bindings, and setting the install path:

./configure --host=arm-linux --without-iconv --without-python --prefix=<libxml-install-path>

Build and Install

Finally we are ready to build and install LibXml2:

make
make install