Previous: Testing the library, Up: Installing and using the library



2.6 Using the library in your programs

To use the Ringing Class Library in your programs, you simply include the relevant header files in your source code, and then link the library into your final program.

Header files are expected to be found in the subdirectory ringing; thus you might type

     #include <ringing/row.h>
     #include <ringing/proof.h>

at the top of a C++ source code file. If this does not work, either your compiler is not looking in the right place for the header files, or you have not installed them in the right place. You may be able to correct this by adding an option (-I on most systems) to your compiler command line.

To link to the installed library, simply add the appropriate option to the command line when linking your program. On most Unix systems, you will have to add -lringing to link with the library.