Showing posts with label libgraph. Show all posts
Showing posts with label libgraph. Show all posts

Friday, April 20, 2012

Install libgraph library in GCC

Step #1.Install the following in Synaptic Package Manager
  • libsdl-image1.2
  • libsdl-image1.2-dev
  • guile-1.8-dev
  • guile-1.8 
Step #2. Download and install libgraph then
  • ./configure
  • sudo make
  • sudo make install
Step #3  Include graphics.h in your C program . Initialize the graphics system by
  • int gd=DETECT, gm=VGAMAX;
  • initgraph(&gd, &gm, NULL);

Step #4 you need to copy all the libgraph shared files from /usr/local/lib to /usr/lib
  •  sudo cp /usr/local/lib/libgraph.* /usr/lib

Now Compile the program  using following command : gcc filename.c -lgraph



Enjoy !!!!