Difference between revisions of "Using PLplot"

From PLplotWiki
Jump to: navigation, search
(initial commit)
 
m
Line 4: Line 4:
 
=== C/C++ ===
 
=== C/C++ ===
 
If the <tt>pkg-config</tt> is available and CMake found it during the configuration stage than programs might be compiled via
 
If the <tt>pkg-config</tt> is available and CMake found it during the configuration stage than programs might be compiled via
 +
For C:
 
  gcc `pkg-config --cflags --libs plplotd` prog.c -o prog
 
  gcc `pkg-config --cflags --libs plplotd` prog.c -o prog
 +
For C++
 +
g++ `pkg-config --cflags --libs plplotd-c++` prog.cpp -o prog
 +
 +
  
 
== Windows ==
 
== Windows ==

Revision as of 15:35, 28 January 2009

The next step after you have successfully managed to configure and build the PLplot library is to build your own program using PLplot. Basically one has to tell the compiler where to find the include files and the library. This depends on the programming language you use and the platform you are working one. It's always a good idea to have a look in the Makefiles which on Linux are based in /usr/local/share/plplot/examples/language if you installed PLplot in the standard location.

Linux

C/C++

If the pkg-config is available and CMake found it during the configuration stage than programs might be compiled via For C:

gcc `pkg-config --cflags --libs plplotd` prog.c -o prog

For C++

g++ `pkg-config --cflags --libs plplotd-c++` prog.cpp -o prog


Windows

C/C++

Mac OS X

C/C++