PDA

View Full Version : Got problem while compiling an OpenGL .cpp file



Rahul04789
June 1st, 2013, 02:34 PM
Hi freiends,

While compiling a .cpp file having code written for OpenGL by using command:
g++ -lGL -lglut tutorial14.cpp -o aaa ,
or
g++ -lGL -lglut -lglew -lglu tutorial14.cpp -o aaa


I got an error message as follows:

tutorial14.cpp:25:21: fatal error: GL/glew.h: No such file or directory
compilation terminated.

My g++ version is as follows:

rahul@rahul-VPCEG28FN:~/Downloads/tutorial14$ g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Regards,
Rahul

MG&TL
June 1st, 2013, 04:34 PM
You'll need to install libglew-dev, it's a separate package.


sudo apt-get install libglew-dev