LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-01-2003, 11:40 PM   #1
Bojdom
LQ Newbie
 
Registered: Jul 2002
Location: Norway
Distribution: Slackware 8.1
Posts: 20

Rep: Reputation: 0
Compiling a simple Mesa/GLUT program


I've just installed Mesa-5.0 on my slackware 8.1 computer and I'm trying to compile one of the sample programs (hello.c).


First I tried to compile with:

gcc -o hello hello.c

and got more than 20 "undefined reference to" messages

Then I figured out that I needed to link some libraries so I tried to put some options:

gcc -o hello -lglut -lGLU -lGL -lm hello.c

This time the compiler gave me "only" two errors

/tmp/ccwCtdPK.o: In function `display':
/tmp/ccwCtdPK.o(.text+0xa7): undefined reference to `glvertex3f'
/tmp/ccwCtdPK.o(.text+0xce): undefined reference to `glvertex3f'
collect2: ld returned 1 exit status

It seems to me that the compiler still miss some library, but I don't know which one. Any ideas?
 
Old 02-02-2003, 01:16 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
gcc -o hello -lglut -lGLU -lGL -lm hello.c
Geting there m8 :}
All you need is to -L/path/to/atual/lib

Cheers,
Tink
 
Old 02-02-2003, 04:19 PM   #3
Bojdom
LQ Newbie
 
Registered: Jul 2002
Location: Norway
Distribution: Slackware 8.1
Posts: 20

Original Poster
Rep: Reputation: 0
I had rewritten the program to understand how it works. And instead of glvertex3f it should be glVertex3f.

Stupid me!

Thanks
 
  


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
Mesa-Glut compilation problem tethysgods Linux - Software 1 09-16-2004 12:33 PM
simple program using openGL in GLUT poeta_boy Programming 14 07-11-2004 04:40 PM
mesa, glut and compiling opengl adhara Programming 3 05-08-2004 05:14 AM
mesa glut libraries adhara Linux - Software 6 05-08-2004 04:45 AM
glut/mesa/openGL gurra Programming 1 10-10-2001 03:36 PM

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

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