2 @page includesbuild Include files and how to build
4 @section includefiles Include files
6 You can find all the Babeltrace library include files (C headers) in the
7 \c babeltrace2 directory under the include files directory chosen when
8 installing Babeltrace. By default, this is <code>/usr/include</code>.
9 If you build Babeltrace from source without specifying an installation
10 prefix, this is <code>/usr/local/include</code>.
12 The documentation modules in \ref apiref always show which header file
13 to include to use the documented functions and types.
15 You can also use the "master" include file which provides everything,
16 but which necessarily makes the compilation slower:
19 #include <babeltrace2/babeltrace.h>
22 @section howtobuild How to build
24 Multiple types of applications can use the Babeltrace library:
26 - A user plugin (shared object) to be loaded by the \c babeltrace2
27 converter program or by another application.
28 - A user application or library which loads plugins to manually connect
29 existing components in a specific way.
30 - A user application or library which creates its own component classes
31 and manually connects them.
33 In any way, the only library to link to is `libbabeltrace2`.
35 @subsection howtobuildplugin Build a plugin
37 To build a user plugin:
40 <li>Compile the source files which form your plugin:
43 cc -c -fpic my-plugin.c
47 <li>Create the plugin shared object:
50 cc -shared my-plugin.o -lbabeltrace2 -o my-plugin.so
55 @subsection howtobuildapp Build an application
57 To build an application which uses the Babeltrace library:
60 <li>Compile the source files which form your application:
67 <li>Create the executable application:
70 cc my-app.o -lbabeltrace2 -o my-app