It would be nice if if there were a package for your operating system which you could easily install. Probably there is not, so you have to compile agentXcpp yourself. Luckily, this is not too hard. Here is how to do it.
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 installed can freely be chosen.
To install agentXcpp right into a linux system, the following command should work:
# Install agentXcpp into a linux system sudo scons install --prefix /usr
sudo
command may fail on some systems, because the environment provided by sudo
may be insufficient for scons, or because sudo
is not installed or not configured. In that case login as root and execute the command without sudo
, i.e. 'scons install -
-prefix /usr
'.-j
parameter to SCons, e.g. 'sudo scons install -j 3 --prefix /usr
'. As a rule of thumb, use number_of_cpus+1
.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 that doesn't fit for your system, 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
The -
switch is only used to deduce the default installation directories. If all three directories are specified on the command line, -prefix
-
does nothing. Package maintainers may omit the directory switches completely and simply call:-prefix
# For package maintainers: Install into ./install-root scons install
This installs agentXcpp into the directory ./install-root
, from where the files may picked up to build the package.
You can uninstall agentXcpp again with the following command:
sudo scons --clean install --prefix /usr
The -
switch removes all files which would be installed without that switch. SCons does not remember which files were really installed before. Therefore, you need to specify the same prefix (or libdir, docdir and includedir) which you used to install the files. You should also use the same agentXcpp version used during installation, since another version might install and uninstall other files. -clean