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.
The following software is needed to build agentXcpp, simply use the versions which are easily available for your system:
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
-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.
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
).