Fred Z - 2015-04-18

I have successfully built plplot and header files are located in /usr/local/include/plplot.

However, when I do

gcc -I /usr/local/include/plplot x00.cc

to compile the first C++ example. The compiler gives me

> /tmp/ccmWvhuf.o: In function `x00::x00(int, char const**)':
> x00.cc:(.text+0x103): undefined reference to `operator new(unsigned long)'
> x00.cc:(.text+0x10e): undefined reference to `plstream::plstream()'
> x00.cc:(.text+0x13d): undefined reference to `plstream::parseopts(int*, char const**, int)'
> x00.cc:(.text+0x14f): undefined reference to `plstream::init()'
> x00.cc:(.text+0x1c3): undefined reference to `plstream::env(double, double, double, double, int, int)'
> x00.cc:(.text+0x1e4): undefined reference to `plstream::lab(char const*, char const*, char const*)'
> x00.cc:(.text+0x209): undefined reference to `plstream::line(int, double const*, double const*)'
> x00.cc:(.text+0x257): undefined reference to `operator delete(void*)'
> /tmp/ccmWvhuf.o: In function `main':
> x00.cc:(.text+0x28f): undefined reference to `operator new(unsigned long)'
> x00.cc:(.text+0x2b3): undefined reference to `operator delete(void*)'
> x00.cc:(.text+0x2c5): undefined reference to `operator delete(void*)'
> /tmp/ccmWvhuf.o: In function `__static_initialization_and_destruction_0(int, int)':
> x00.cc:(.text+0x300): undefined reference to `std::ios_base::Init::Init()'
> x00.cc:(.text+0x30f): undefined reference to `std::ios_base::Init::~Init()'
>/tmp/ccmWvhuf.o:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
> collect2: error: ld returned 1 exit status

I think I am missing some libraries here. Sorry if it's a dumb beginner question. But I am really confused about how C++ bindings work. I will appreciate any help on the problem!