Compiling programs using the AO Shared Service Library

Compiling your Application

g++ is the recommended compiler for building applications using AOSSL, version 5.0 or greater.


When linking your to AOSSL, you will also need to link to certain dependencies in many cases. In all cases, you will need to link to aossl directly:


HTTP Administrator

The HTTP Admin uses Curl, which can be linked against with:


HTTP Server

The HTTP Server relies on libevent, which can be linked against with:


Consul Administrator

The Consul Admin uses the HTTP Administrator, so you will need to link against curl here as well:



For logging, we use the Log4Cpp module, which can be linked against with:

-lpthread -llog4cpp

UUID Generation

The UUID Generator uses libuuid, which can be linked against with:



ZeroMQ Communications utilize the ZMQ library and C++ bindings, which can be linked against with:



Redis utilizes the hiredis library, which can be linked against with:


If pkg-config is set up and libhiredis is installed correctly, we can also use:

`pkg-config --cflags --libs hiredis`


Mongo utilizes both the Mongo C Driver libmongoc as well as libbson for json to bson conversions.

-lmongoc-1.0 -lbson-1.0

When you use the default installers (included in the build_deps scripts), the files for these libraries won't be on your default include and linker paths. You may need to include the below directives to link against libmongo and libbson.

-I/usr/include/libbson-1.0 -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -L/usr/local/lib


Neo4j depends on the Neo4j client, which needs to link against several dependencies:

-lneo4j-client -lssl -lcrypto -lm


AO Shared Service Library is coded to the c++11 standard.



Please continue on to the Tests section of the documentation to learn about the libraries automated tests.

Go Home