Compiling C++ or C software to use libSBML is usually a matter of supplying certain options during compilation and linking. Let DIR stand for the directory used during the libSBML configuration step as the value of the --prefix=DIR option (if you used configure to configure libSBML) or CMAKE_INSTALL_PREFIX (if you used CMake). There are two main sets of settings on Unix-like systems such as Linux:

If you have the pkg-config utility, the steps above can be substantially simplified. First, make sure that your PKG_CONFIG_PATH environment variable includes the path to the directory DIR/lib/pkgconfig (which is the directory where the file libsbml.pc will be installed by libSBML's make install step). Then, you can run pkg-config with the --cflags and/or --libs flags in your compilation/linking command. Here is an example:

g++ `pkg-config --cflags --libs libsbml` myprogram.cpp

Note the use of the backward quote in the shell command above; it has the effect of running the command pkg-config --cflags --libs libsbml and substituting in place the flags returned by the command.