next up previous 231
Next: Changes in release (1.1)
Up: USING IMG FROM C
Previous: Reading and writing header items from/to many images

Compiling and linking C programs

Compiling and linking a C program is very similar to the methods described (in the Fortran section), except that you must compile the source code before the linking stage.

If your program source file is named prog.c, and it only depends on IMG, then the commands:

% cc -c -I/star/include prog.c 
% alink prog.o -L/star/lib `img_link_adam`
will compile the source and link the program.



next up previous 231
Next: Changes in release (1.1)
Up: USING IMG FROM C
Previous: Reading and writing header items from/to many images

IMG Simple Image Data Access
Starlink User Note 160
P.W. Draper
R.F. Warren-Smith
3 March 2003
E-mail:P.W.Draper@durham.ac.uk

Copyright © 2000-2003 Council for the Central Laboratory of the Research Councils