Tuscany SDO C++ - Building STDCXX for Tuscany SDO
STDCXX is an implementation of the C++ Standard Library provided by Apache.
The website is at http://incubator.apache.org/stdcxx/.
At the time of writing, the current release is 4.1.3 and is available as
source distribution only. This document explains how to build stdcxx for
Windows XP and Red Hat Enterprise Linux 3 in the way required by the SDO build
process.
Building STDCXX
Building STDCXX on Linux
- The release is distributed as a gzipped tar file, called
stdcxx-incubating-4.1.3.tar.gz. Extract the contents of this file into a
convenient directory. For this example, let's assume it is
/home/Tuscany/stdcxx-4.1.3
- Define the STDCXX_HOME environment variable to refer to this directory. The
Tuscany SDO build system uses this environment variable to locate stdcxx.
- Change directory to STDCXX_HOME. Then build a debug version of the stdcxx
library using the following command:
gmake BUILDDIR=$STDCXX_HOME/Debug BUILDTYPE=15d CONFIG=gcc.config
This will create a sub-directory of STDCXX_HOME called Debug and place the
build products below that.
- For a release version the command is:
gmake BUILDDIR=$STDCXX_HOME/Release BUILDTYPE=12d CONFIG=gcc.config
This provides Tuscany SDO with the versions of stdcxx that it needs for both
Release and Debug builds.
Building STDCXX on Windows
STDCXX is supported only when used with Microsoft Visual Studio C++ V7.1
- The release is distributed as a gzipped tar file, called stdcxx-incubating-4.1.3.tar.gz.
Extract the contents of this file into a convenient directory. For this example let's
assume it is C:\Tuscany\stdcxx-4.1.3
- Define the STDCXX_HOME environment variable to refer to this directory. The
Tuscany SDO build system uses this environment variable to locate stdcxx.
- Create two directories to contain the results of building stdcxx. The first is
for the debug enabled version and must be:
<STDCXX_HOME>\Debug
- The second is for the release (ie optimised) version and must be
<STDCXX_HOME>\Release
- Launch an MSVC++ 7.1 command window. In the command window, set the default
directory to <STDCXX_HOME> where there is a file called generate.bat. Create
the project definitions that MSVC++ 7.1 will need in order to build stdcxx by
running generate.bat using the following command:
.\generate.bat /BUILDDIR:<STDCXX_HOME>\Debug /CONFIG:VC71
It is necessary to provide the full, absolute path to the build directory - it
is not sufficient to provide a relative path. (This restriction will be fixed
in a future release.)
- Repeat this operation for the release build, via the command:
.\generate.bat /BUILDDIR:<STDCXX_HOME>\Release /CONFIG:VC71
- Still using the MSVC++ 7.1 command window, set the default directory to one of
the two build directories eg
cd <STDCXX_HOME>\Debug
- Then launch the developer studio via
cd <STDCXX_HOME>\Debug
- Select the configuration to build. For the Debug version of SDO this will be
"15d Debug Thread-safe Dll". Then select "Build Solution". The build will take
a while to complete and runs a test suite when it is finished. The test suite
is extensive and produces a scattering of errors, however the library build
itself is fine.
- Repeat this process for the release version, setting the default directory to
cd <STDCXX_HOME>\Release
and choosing "12d Optimized Thread-safe Dll" as the build configuration.
This provides Tuscany SDO with the versions of stdcxx that it needs for both
Release and Debug builds.