LinuxQuestions.org
Register a domain and help support LQ
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, 01: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, 02:06 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
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, 10:14 AM   #3
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

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


All times are GMT -5. The time now is 09:53 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration