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

9. 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:
\begin{code}
\begin{verbatim}...

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


\begin{code}
\begin{verbatim}$(EXECNAME): $(OBJS) -lfh\end{verbatim}\end{code}

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