LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 04-28-2004, 06:13 PM   #1
BrandonTurner
LQ Newbie
 
Registered: Mar 2004
Posts: 14

Rep: Reputation: 0
glut


ok i have been trying to compile the first linux ported demo of the NeHe opengl demos. and when i go to compile i get all these errors:

Quote:

lesson1.c:9:61: GL/glut.h: No such file or directory
lesson1.c:10:64: GL/gl.h: No such file or directory
lesson1.c:11:61: GL/glu.h: No such file or directory

lesson1.c: In function `InitGL':
lesson1.c:23: warning: implicit declaration of function `glClearColor'
lesson1.c:24: warning: implicit declaration of function `glClearDepth'
lesson1.c:25: warning: implicit declaration of function `glDepthFunc'
lesson1.c:25: error: `GL_LESS' undeclared (first use in this function)
lesson1.c:25: error: (Each undeclared identifier is reported only once
lesson1.c:25: error: for each function it appears in.)
lesson1.c:26: warning: implicit declaration of function `glEnable'
lesson1.c:26: error: `GL_DEPTH_TEST' undeclared (first use in this function)
lesson1.c:27: warning: implicit declaration of function `glShadeModel'
lesson1.c:27: error: `GL_SMOOTH' undeclared (first use in this function)
lesson1.c:29: warning: implicit declaration of function `glMatrixMode'
lesson1.c:29: error: `GL_PROJECTION' undeclared (first use in this function)
lesson1.c:30: warning: implicit declaration of function `glLoadIdentity'
lesson1.c:32: warning: implicit declaration of function `gluPerspective'
lesson1.c:32: error: `GLfloat' undeclared (first use in this function)
lesson1.c:32: error: syntax error before "Width"
lesson1.c:34: error: `GL_MODELVIEW' undeclared (first use in this function)
lesson1.c: In function `ReSizeGLScene':
lesson1.c:43: warning: implicit declaration of function `glViewport'
lesson1.c:45: error: `GL_PROJECTION' undeclared (first use in this function)
lesson1.c:48: error: `GLfloat' undeclared (first use in this function)
lesson1.c:48: error: syntax error before "Width"
lesson1.c:49: error: `GL_MODELVIEW' undeclared (first use in this function)
lesson1.c: In function `DrawGLScene':
lesson1.c:55: warning: implicit declaration of function `glClear'
lesson1.c:55: error: `GL_COLOR_BUFFER_BIT' undeclared (first use in this function)
lesson1.c:55: error: `GL_DEPTH_BUFFER_BIT' undeclared (first use in this function)
lesson1.c:59: warning: implicit declaration of function `glutSwapBuffers'
lesson1.c: In function `keyPressed':
lesson1.c:72: warning: implicit declaration of function `glutDestroyWindow'
lesson1.c:75: warning: implicit declaration of function `exit'
lesson1.c: In function `main':
lesson1.c:83: warning: implicit declaration of function `glutInit'
lesson1.c:90: warning: implicit declaration of function `glutInitDisplayMode'
lesson1.c:90: error: `GLUT_RGBA' undeclared (first use in this function)
lesson1.c:90: error: `GLUT_DOUBLE' undeclared (first use in this function)
lesson1.c:90: error: `GLUT_ALPHA' undeclared (first use in this function)
lesson1.c:90: error: `GLUT_DEPTH' undeclared (first use in this function)
lesson1.c:93: warning: implicit declaration of function `glutInitWindowSize'
lesson1.c:96: warning: implicit declaration of function `glutInitWindowPosition'lesson1.c:99: warning: implicit declaration of function `glutCreateWindow'
lesson1.c:102: warning: implicit declaration of function `glutDisplayFunc'
lesson1.c:105: warning: implicit declaration of function `glutFullScreen'
lesson1.c:108: warning: implicit declaration of function `glutIdleFunc'
lesson1.c:111: warning: implicit declaration of function `glutReshapeFunc'
lesson1.c:114: warning: implicit declaration of function `glutKeyboardFunc'
lesson1.c:120: warning: implicit declaration of function `glutMainLoop'
make: *** [lesson1.o] Error 1

but i bolded the ones that i think are important. the first three where it cant find the header files for glut. but i installed the glut rpm from freshrpms, and also a mesa rpm from findrpm. net. shouldnt it have added these header files with the glut rpm? i searched my HD to see if they were placed somewhere else but it didnt find them. anyone know whats wrong? im using fedora core 1.
 
Old 04-28-2004, 06:32 PM   #2
BrandonTurner
LQ Newbie
 
Registered: Mar 2004
Posts: 14

Original Poster
Rep: Reputation: 0
ok i fixed that but i get this error now:
Quote:
lesson1.c: In function `keyPressed':
lesson1.c:75: warning: implicit declaration of function `exit'
gcc -Wall -I/usr/include/ -o lesson1 -L/usr/X11R6/lib lesson1.o -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm -lMesaGLU
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
make: *** [lesson1] Error 1
rm lesson1.o
 
Old 05-05-2004, 07:51 AM   #3
adhara
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake 9.1
Posts: 41

Rep: Reputation: 15
glut.h fix

Hi there,

I am having the same problem you came across initially.

glut.h include file is in /usr/X11R6/include/GL/
yet upon compiling - error cannot find glu.h: no such file or directory.

That is the weird thing, it complains it cant find glu.h yet I keep reading that glu.h and gl.h are the same as glut.h.

Is this information incorrect. Or do I need to install glu.h seperately.
I have mesa installed. I dont know what the problem is.

I am very new to c++ and opengl.

Any help appreciated.

Adhara
 
Old 06-03-2004, 06:36 AM   #4
calawson
LQ Newbie
 
Registered: Jun 2004
Location: Australia
Distribution: Mandrake, Fedora
Posts: 1

Rep: Reputation: 0
I'm having the same problem too!

Please tell us how you fixed BrandonTurner.

I took a long shot and simply tried copying glu.h to glut.h in /usr/include/GL. This reduced the number of errors from the complier but is an inadequate hack.

I'm using Fedora (Core 2) and I installed GLUT from the download at opengl.org.

Corin.
 
Old 06-04-2004, 01:18 AM   #5
adhara
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake 9.1
Posts: 41

Rep: Reputation: 15
Hi calawson,

Do you have the mesa-devel package installed?
 
Old 08-21-2004, 03:46 AM   #6
Don Jose
LQ Newbie
 
Registered: Jun 2004
Posts: 1

Rep: Reputation: 0
hello. you should install devel-opengl to get the libraries problem solve. and i have a question. when i use glutfllscreen under fedora 2 the screen still has borders. how can i remove that?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GLUT yogotie Programming 4 05-05-2005 08:17 AM
how to install GLUT 6u4nYu Linux - General 11 12-16-2004 10:23 PM
Why do you use GLUT? The_Nerd Programming 2 07-13-2004 08:30 AM
Glut 3.7 login365 Linux - Software 7 11-01-2003 04:56 AM
Glut???? FXRS Linux - Software 5 07-23-2003 07:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration