Graphics Installation Commands
(Paste the following commands in terminal. Dont include ‘ $ ’ while pasting)
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install build-essential
$ sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-2.2 guile-2.2-dev
$ wget http://download.savannah.gnu.org/releases/libgraph/libgraph-1.0.2.tar.gz
$ tar -xzvf libgraph-1.0.2.tar.gz
$ cd libgraph-1.0.2
$ CPPFLAGS="$CPPFLAGS $(pkg-config --cflags-only-I guile-2.2) -fcommon" \
CFLAGS="$CFLAGS $(pkg-config --cflags-only-other guile-2.2) -fcommon" \
LDFLAGS="$LDFLAGS $(pkg-config --libs guile-2.2)" \
./configure
$ make && sudo make install
$ sudo cp /usr/local/lib/libgraph.* /usr/lib
----------------------------------------------------------------------------------------------------------
To check
(put program circle.cpp in home directory)
$ cd
$ g++ circle.cpp -o abc.o -lgraph
$ ./abc.o //circle should be displayed
------------------------------------------------------------------------
OpenGL Installation Commands
$ sudo apt update
$ sudo apt install build-essential freeglut3-dev libglew-dev
------------------------------------------------------------------------------------
To check
(put program main6.cpp in home directory)
$ g++ main6.cpp -o cube -lGL -lGLU -lglut
$ ./cube // cube should be displayed