Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[root@rpcztc Downloads]# g++ -W -pedantic -o radmon test.cpp
test.cpp:7:21: error: /GL/glu.h: No such file or directory
test.cpp:8:20: error: /GL/gl.h: No such file or directory
test.cpp: In function 'void Initialize()':
test.cpp:12: error: 'glClearColor' was not declared in this scope
test.cpp:13: error: 'GL_PROJECTION' was not declared in this scope
test.cpp:13: error: 'glMatrixMode' was not declared in this scope
test.cpp:14: error: 'glLoadIdentity' was not declared in this scope
test.cpp:15: error: 'glOrtho' was not declared in this scope
test.cpp: In function 'int main(int, char**)':
test.cpp:19: error: 'glutInit' was not declared in this scope
test.cpp:20: error: 'GLUT_SINGLE' was not declared in this scope
test.cpp:20: error: 'GLUT_RGB' was not declared in this scope
test.cpp:20: error: 'glutInitDisplayMode' was not declared in this scope
test.cpp:21: error: 'glutInitWindowSize' was not declared in this scope
test.cpp:22: error: 'glutInitWindowPosition' was not declared in this scope
test.cpp:23: error: 'glutCreateWindow' was not declared in this scope
test.cpp:25: error: 'Draw' was not declared in this scope
test.cpp:25: error: 'glutDisplayFunc' was not declared in this scope
test.cpp:26: error: 'glutMainLoop' was not declared in this scope
I look at the /usr/include/GL and I am able to see the glu.h header!
Any idea what link is missing?
[root@rpcztc Downloads]# g++ -W -pedantic -o radmon test.cpp
test.cpp:7:21: error: /GL/glu.h: No such file or directory
test.cpp:8:20: error: /GL/gl.h: No such file or directory
test.cpp: In function 'void Initialize()':
test.cpp:12: error: 'glClearColor' was not declared in this scope
test.cpp:13: error: 'GL_PROJECTION' was not declared in this scope
test.cpp:13: error: 'glMatrixMode' was not declared in this scope
test.cpp:14: error: 'glLoadIdentity' was not declared in this scope
test.cpp:15: error: 'glOrtho' was not declared in this scope
test.cpp: In function 'int main(int, char**)':
test.cpp:19: error: 'glutInit' was not declared in this scope
test.cpp:20: error: 'GLUT_SINGLE' was not declared in this scope
test.cpp:20: error: 'GLUT_RGB' was not declared in this scope
test.cpp:20: error: 'glutInitDisplayMode' was not declared in this scope
test.cpp:21: error: 'glutInitWindowSize' was not declared in this scope
test.cpp:22: error: 'glutInitWindowPosition' was not declared in this scope
test.cpp:23: error: 'glutCreateWindow' was not declared in this scope
test.cpp:25: error: 'Draw' was not declared in this scope
test.cpp:25: error: 'glutDisplayFunc' was not declared in this scope
test.cpp:26: error: 'glutMainLoop' was not declared in this scope
I look at the /usr/include/GL and I am able to see the glu.h header!
Any idea what link is missing?
I made the changes to the header path;
#include <GL/glu.h>
#include <GL/gl.h>
[root@localhost Desktop]# g++ -W -pedantic -o radmon test.cpp
test.cpp:1:20: error: GL/glu.h: No such file or directory
test.cpp: In function int main(int, char**):
test.cpp:13: error: glutInit was not declared in this scope
test.cpp:14: error: GLUT_SINGLE was not declared in this scope
test.cpp:14: error: GLUT_RGB was not declared in this scope
test.cpp:14: error: glutInitDisplayMode was not declared in this scope
test.cpp:15: error: glutInitWindowSize was not declared in this scope
test.cpp:16: error: glutInitWindowPosition was not declared in this scope
test.cpp:17: error: glutCreateWindow was not declared in this scope
test.cpp:19: error: Draw was not declared in this scope
test.cpp:19: error: glutDisplayFun was not declared in this scope
test.cpp:20: error: glutMainLoop was not declared in this scope
To knudfl and metaschima;
As you can see below, I had installed both of the packages you were referring to and still I am getting error!!
[root@localhost ~]# yum install freeglut-devel
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.rafal.ca
* extras: centos.mirror.rafal.ca
* updates: centos.cubiculestudio.com
Setting up Install Process
Package freeglut-devel-2.4.0-7.1.el5.i386 already installed and latest version
Nothing to do
[root@localhost ~]# yum install libGLU-devel
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.rafal.ca
* extras: centos.mirror.rafal.ca
* updates: centos.cubiculestudio.com
Setting up Install Process
Package mesa-libGLU-devel-6.5.1-7.11.el5_9.i386 already installed and latest version
Nothing to do
[root@localhost ~]# pwd
/root
[root@localhost ~]# cd Desktop/
[root@localhost Desktop]# ls
C++ eclipse test.cpp test.cpp~ test.sh test.sh~ Unsaved Document 1
[root@localhost Desktop]# g++ test.cpp -o radmon
test.cpp: In function ‘int main(int, char**)’:
test.cpp:13: error: ‘glutInit’ was not declared in this scope
test.cpp:14: error: ‘GLUT_SINGLE’ was not declared in this scope
test.cpp:14: error: ‘GLUT_RGB’ was not declared in this scope
test.cpp:14: error: ‘glutInitDisplayMode’ was not declared in this scope
test.cpp:15: error: ‘glutInitWindowSize’ was not declared in this scope
test.cpp:16: error: ‘glutInitWindowPosition’ was not declared in this scope
test.cpp:17: error: ‘glutCreateWindow’ was not declared in this scope
test.cpp:19: error: ‘Draw’ was not declared in this scope
test.cpp:19: error: ‘glutDisplayFunc’ was not declared in this scope
test.cpp:20: error: ‘glutMainLoop’ was not declared in this scope
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.