On 2008-04-08 21:36-0400 ppiatrou@... wrote:
> Hi,
>
> I am a plplot newbuy, have just installed it to my Kubuntu machine from
> the repository. I could not find in the documentation a single example of
> how to compile and link a program that uses plplot. My attempts to compile
> some test codes by guessing right library names and paths with the aid of
> pkg-config did not lead to any success.
>
> Could someone provide me with compiling and linking examples that are
> known work on Linux with gcc/g++/g77/gfortran?
Hi Piotr:
We have lots of fortran (and other language) examples. For Debian they are
in a package called libplplot-dev. I am pretty sure that kubuntu uses that
same package name since it is a Debian derivative. Once you install that
package, then look for fortran examples _and a Makefile to build them_ in
either/both /usr/share/doc/libplplot9/examples/f77
/usr/share/doc/libplplot9/examples/f95.
Alternatively, build and install your own PLplot (including all our fortran
examples) following the directions in our wiki.
Good luck, and thanks for your interest in PLplot.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________

On Apr 8, 2008, at 9:36 PM, ppiatrou@... wrote:
> Hi,
>
> I am a plplot newbuy, have just installed it to my Kubuntu machine
> from
> the repository. I could not find in the documentation a single
> example of
> how to compile and link a program that uses plplot. My attempts to
> compile
> some test codes by guessing right library names and paths with the
> aid of
> pkg-config did not lead to any success.
>
> Could someone provide me with compiling and linking examples that are
> known work on Linux with gcc/g++/g77/gfortran?
For simple programs that only depend on PLplot, this works for me on
linux:
gcc test1.c -o test1 -lplplotd
-Hazen

On Tue, 08 Apr 2008, ppiatrou@... wrote:
> Hi,
>
> I am a plplot newbuy, have just installed it to my Kubuntu machine from
> the repository. I could not find in the documentation a single example of
> how to compile and link a program that uses plplot. My attempts to compile
> some test codes by guessing right library names and paths with the aid of
> pkg-config did not lead to any success.
>
> Could someone provide me with compiling and linking examples that are
> known work on Linux with gcc/g++/g77/gfortran?
>
> Regards,
> Piotr
Piotr,
If you have the appropriate -dev package(s) installed, then the
following should get you started:
gcc `pkg-config --cflags --libs plplotd` x01c.c -o x01
x01c.c is one of the examples included with PLplot. The examples
are included under one of the /usr/share/doc/*plplot* directories,
though I do not remember which. The same basic command should work
for other code as well as long as you include any extra required
options for other libraries you use.
Hope this helps,
Hez

Hi,
I am a plplot newbuy, have just installed it to my Kubuntu machine from
the repository. I could not find in the documentation a single example of
how to compile and link a program that uses plplot. My attempts to compile
some test codes by guessing right library names and paths with the aid of
pkg-config did not lead to any success.
Could someone provide me with compiling and linking examples that are
known work on Linux with gcc/g++/g77/gfortran?
Regards,
Piotr