LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 01-23-2006, 02:05 AM   #1
BorgAssimilator
LQ Newbie
 
Registered: Nov 2004
Posts: 9

Rep: Reputation: 0
Missing header GLTK in compiling an openGL program


I've recently started learning openGL programming. However, when I compile the program, it can't detect the header file "gltk.h", causing numerous functions not to be found. I have looked for a library containing these files, but the closest I got was a site with broken links claiming it had an rpm that probably didn't work. Either way, I'm at a loss. I'm sure there's something simple that I'm just not seeing, so I'm asking if anyone could point me in the right directon. As a note, I'm using Slackware 10.2 and kernel 2.6.14.4. I have also included the error message just in case I have a completely wrong idea of what's going on.


I am using the exact code from the following tutorial site:

http://www.eecs.tulane.edu/www/Terry...L%20Primitives

Code:
user@computer:~$ gcc -o Primitives Primitives.c -lX11 -lMesaGL -lMesaGLU -lMesatk -lm
test.c:19:18: gltk.h: No such file or directory
test.c: In function `expose':
test.c:24: error: `GL_COLOR_BUFFER_BIT' undeclared (first use in this function)
test.c:24: error: (Each undeclared identifier is reported only once
test.c:24: error: for each function it appears in.)
test.c: In function `reshape':
test.c:30: error: `GLint' undeclared (first use in this function)
test.c:30: error: syntax error before "width"
test.c:34: error: `GL_PROJECTION' undeclared (first use in this function)
test.c:44: error: `GL_MODELVIEW' undeclared (first use in this function)
test.c:47: error: `GL_COLOR_BUFFER_BIT' undeclared (first use in this function)
test.c: At top level:
test.c:50: error: syntax error before "key_down"
test.c:50: error: syntax error before "GLenum"
test.c: In function `key_down':
test.c:52: error: `key' undeclared (first use in this function)
test.c:52: error: `TK_ESCAPE' undeclared (first use in this function)
test.c:52: error: `TK_q' undeclared (first use in this function)
test.c:52: error: `TK_Q' undeclared (first use in this function)
test.c: In function `draw':
test.c:67: error: `GL_LINES' undeclared (first use in this function)
test.c:89: error: `GL_LINE_STRIP' undeclared (first use in this function)
test.c:100: error: `GL_LINE_LOOP' undeclared (first use in this function)
test.c:111: error: `GL_POLYGON' undeclared (first use in this function)
test.c:122: error: `GL_QUADS' undeclared (first use in this function)
test.c:133: error: `GL_QUAD_STRIP' undeclared (first use in this function)
test.c:144: error: `GL_TRIANGLES' undeclared (first use in this function)
test.c:155: error: `GL_TRIANGLE_STRIP' undeclared (first use in this function)
test.c:166: error: `GL_TRIANGLE_FAN' undeclared (first use in this function)
test.c: In function `main':
test.c:185: error: `GL_FALSE' undeclared (first use in this function)
 
Old 01-23-2006, 09:07 PM   #2
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
that tutorial is using the Tk toolkit .. so you should have somthing specific for Tk and opengl, probably from the website? ..

I have never used Tk and opengl, or Tk for that matter.. i have however used alot of the tutorials at NeHe's site and have not had any problems..
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot compile OpenGL program because libGL.a is missing lasindi Slackware 4 04-12-2009 04:09 PM
Missing C header files? kushalkoolwal Programming 3 11-07-2005 04:52 AM
Missing C header for Fortune-Mod goofyheadedpunk Slackware 5 03-06-2005 06:33 PM
OpenGL Header Files daclam Linux - Software 2 08-07-2004 10:01 PM
OpenGL header file not found haruki_zaemon Linux - Software 1 08-18-2003 09:21 PM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration