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
 
Search this Thread
Old 03-28-2004, 12:51 PM   #1
chaks
LQ Newbie
 
Registered: Mar 2004
Posts: 1

Rep: Reputation: 0
compiling problem ...


hay wizards,
i wrote a simple graphics program.i include ...#include<GL/glut.h>.
after that i compile it .... gcc prog.c.
it is giving error ,like glut is not defined ,something like this.

at first glut.h was not installed ,so i installed it.i m using mandrake 9.2
Is there any problem in compiling?or something else.
i m new to openGl programming.plz somebd guide me.

............................................................chaks
 
Old 03-28-2004, 01:06 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
Quote:
something like this
not particuarely useful... give us a message which is "exactly like this".

so what is the full path of glut.h then?
 
Old 03-29-2004, 09:14 AM   #3
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 31
I can't say for sure, since you give very little information to go on, but you're probably getting linker errors. You have to tell gcc which libraries to use. My command-line for glut apps generally looks something like so:

gcc -o myprog prog.c -I/usr/X11R6/include -L/usr/X11R6/lib -lglut -lGL -lGLU

Note the case of the libraries. Linux filenames are case-sensitive...
 
  


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
Problem compiling javakid Programming 8 12-16-2004 12:03 AM
Problem compiling Kami.JZ Linux - Newbie 6 10-26-2004 06:28 AM
problem compiling :( celeron2002 Linux - Software 1 02-22-2004 07:19 PM
Compiling Problem... ThE_DeaD Linux - Newbie 10 12-14-2003 03:14 PM
Compiling 2.4.20 problem frankietomatoes Linux - General 1 01-09-2003 05:43 PM


All times are GMT -5. The time now is 11:46 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