AgentXcpp  Revision:0.1.1
API Documentation
 All Classes Functions Variables 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.

Note:
The build process can be accelerated with the -j i parameter, where i is the maximum number of threads used. As a rule of thumb, use i = (number_of_cpus + 1).

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
  • 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:
    • Asio
    • Bind
    • Smart Ptr
    • Test
    • Integer

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:
Using the sudo command may fail on some systems, because the environment provided by sudo may be insufficient for scons.

This 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 any case, 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/lib \
              --docdir=/opt/agentxcpp/doc