To compile and link an application which uses libbabeltrace2:
Compile your C/C++ files as usual.
Link the resulting object files with the Babeltrace 2 library: