next up previous contents
Next: 9. Recipes for Converting Up: CFHT FITS Handling Library Previous: 7. Redirecting Error Messages   Contents

8. Including and Linking the Library

There are two components to the library: a header file ``fh.h'' and the implementation, ``fh.c''.

Programs which libfh as part of Pegasus can include the header file like this:


   #include "fh/fh.h"

Linking with the library is accomplished by adding -lfh to the $(EXECNAME) line of the Makefile:


   $(EXECNAME): $(OBJS) -lfh

The above applies to projects in the CFHT source tree, /cfht/src/...

If you made your own copies if fh.h and fh.c, include just ``fh.h'' instead of ``fh/fh.h'' and link fh.c into your program as just another C file.


next up previous contents
Next: 9. Recipes for Converting Up: CFHT FITS Handling Library Previous: 7. Redirecting Error Messages   Contents
Jim Thomas
2013-12-19