I'm trying to compile and run the book's online code from http://www.cs.unm.edu/~angel/BOOK/INTERACTIVE_COMPUTER_GRAPHICS/SIXTH_EDITION/CODE/, but they only seem to have Mac and Windows versions; how do I run this on Linux? I've spent hours trying to get the dependencies and things right just to build the simple examples in chapter 2!
I'm Tony from the future! If you continue on the path you're on, you'll end up spending several more hours before figuring this out - the good news is that I've already done it, and have compiled the following steps to help you out!
sudo apt-get install freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev
From http://www.cs.unm.edu/~angel/BOOK/INTERACTIVE_COMPUTER_GRAPHICS/SIXTH_EDITION/CODE/, download the following files:
cd CHAPTER02
g++ ../Common/InitShader.cpp example1.cpp -I../include -lglut -lGL -lGLU -lc -lm -lGLEW -o example1.out
Make some changes to resolve errors:
#include <stdio.h>
to include/mat.h//glutInitContextVersion( 3, 2 );
//glutInitContextProfile( GLUT_CORE_PROFILE );
"#version 130"
instead of 150