next up previous contents
Next: 8. Recipes for Converting Up: CFHT FITS Handling Library Previous: 6. Changing Keywords   Contents

7. 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: 8. Recipes for Converting Up: CFHT FITS Handling Library Previous: 6. Changing Keywords   Contents
Sidik Isani
2001-04-27