PGPLOT_DIR:CPGPLOT/LIB, PGPLOT_DIR:GRPSHR/LIB
</pre>

For C, two libraries are required.</li>
</ul>

<h2>Compiling and Linking a C++ Program</h2>

<p>This is even more difficult than compiling a C program, because you must ensure that both the C++ support libraries and the Fortran support libraries are included. The example above (using g77) can be adapted for the GNU C++ compiler (g++) on Solaris and Linux; for other compilers, you may need to consult an expert.</p>

<pre class="c">g++ -o pgprog -I/usr/loc