---- file aaaread.me2 ----- 

This note explains how the C binding to PGPLOT (cpgplot) can be used
under Windows. It applies to

* C programs compiled with MS Visual C++ V4.0;
* calling PGPLOT compiled with MS Powerstation Fortran V4.0;
* under MS Windows-95 or Windows-NT.

Other compilers may use different calling conventions and will require
a different version of the C binding.

You need the following files from PGPLOT v5.2 or later:

 pgplot/cpg/pgbind.c
 pgplot/cpg/pgbind_prototypes
 pgplot/sys_win/pgbind.mak

(pgbind_prototypes is a list of the C function prototype lines
extracted from the Fortran source code for PGPLOT.)

-----------------------------------------------------------------------
Installation:

To build the cpgplot binding library, you will need the following 
files:
	pgbind.c
	pgbind.mak
	pgbind_prototypes
These files can be located anywhere convenient. 

To build the library, from a console (DOS) window type

	 NMAKE /F PGBIND.MAK

This will create cpgplot.lib and cpgplot.h

The makefile compiles pgbind.c (no unusual compiler flags are needed) 
to produce the pgbind program. It then produces the C wrapper functions 
(one file per wrapper) and the cpgplot.h header file using:

   pgbind ms -w -h pgbind_prototypes

The cpg*.c files are then compiled and gathered into a library.

-------------------------------------------------------------------------
Usage:

To use cpgplot in your programs, you should include cpgplot.h
at the top of all C files that use cpgplot functions, and link your
programs with both of cpgplot.lib and pgplot.lib. 

For further information about using the C binding, see file

  pgplot/cpg/cpgplot.doc

or the Web page

  http://astro.caltech.edu/~tjp/pgplot/cbinding.html
