AgentXcpp  Revision:0.2
API Documentation
 All Classes Functions Variables Enumerations Enumerator Friends Pages
Building and Installing AgentXcpp

If you are lucky, there is a package for your system which can be easily installed. If you are not so lucky, or if you are a package maintainer, you have to compile agentXcpp yourself. Here is how to do this.

Prerequisites

The following software is needed to build agentXcpp, simply use the versions which are easily available for your system:

  • Standard build environment (compiler, linker, etc.)
  • Doxygen, to build the documentation (version 1.8.1.2 is recommended)
  • The dot tool from the graphviz package, which is used by doxygen to generate diagrams
  • SCons, to control the build process
  • The following boost libraries:
    • Bind
    • Smart Ptr
    • Test
    • Integer
  • The following QT4 libraries:
    • QtCore
    • QNetwork

Building and installing agentXcpp

Building and installing agentXcpp is a one-step operation: one command builds the library and installs all files. The place where they are is installed can freely be chosen. If you want to make an agentXcpp package, you probably need to install into a local directory. If you are an end user you certainly want to install into the system such that you can use the library.

To install it into a linux system, the following command should work:

# To install into a linux system, do as root:
scons install --prefix /usr
Note
The build process can be accelerated by givin the -j i parameter to SCons, where i is the maximum number of threads used. As a rule of thumb, use i = (number_of_cpus + 1).

Instead of becoming root, you can also use the sudo command.

Note
Using the sudo command may fail on some systems, because the environment provided by sudo may be insufficient for scons.

The shown command will install the headers into /usr/include/agentxcpp/, the shared library to /usr/lib/ and the API documentation to /usr/share/doc/agentxcpp/. If want to install into a local directory, use:

# To install locally, do:
scons install --prefix ./usr

This will install the headers, shared library, and the API documentation to ./usr/include/agentxcpp/, ./usr/lib/ and ./usr/share/doc/agentxcpp/, respectively. You can pick them up there for your package.

In addition, you can control the individual installation directories like so:

# To choose each directory separately:
scons install --libdir /usr/lib \
              --docdir /opt/agentxcpp/doc \
              --includedir /usr/include/agentxcpp \

# This will do the same:
scons install --prefix=/usr \
              --docdir=/opt/agentxcpp/doc

If completely omit the –prefix, –libdir, –docdir and –includedir parameters, the default prefix will be used (the default prefix can be obtained with scons –help).