I'm starting to learn OpenGL with Redbook version 4.3 and I need some linking help (I think). I am running Linux Mint and a Radeon HD 5000/6000/7350/8350 Series video card. I'm trying to compile and link the first program (triangles.cpp). I installed freeglut3
, freeglut3-dev
, libxi-dev
, glew-utils
, and libglew-dev
. I found this linking command in an old version of OpenGL Superbible and I'm guessing I need to add -lGLEW.
g++ triangles.cpp -lX11 -lXi -lglut -lGL -lGLU -lGLEW
I get the following error:
/tmp/ccXSL2nx.o: In function `init()':
triangles.cpp:(.text+0x11d): undefined reference to `LoadShaders'
collect2: error: ld returned 1 exit status
I copied over vgl.h
and LoadShaders.h
and LoadShaders.cpp
from the Redbook's source code download. What else am I missing?