On Tue, 08 Apr 2008, ppiatrou@... wrote:
> 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?
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,