Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 02-02-2003, 12:40 AM   #1
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, 02:16 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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

Old 02-02-2003, 05:19 PM   #3
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!



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 01:33 PM
simple program using openGL in GLUT poeta_boy Programming 14 07-11-2004 05:40 PM
mesa, glut and compiling opengl adhara Programming 3 05-08-2004 06:14 AM
mesa glut libraries adhara Linux - Software 6 05-08-2004 05:45 AM
glut/mesa/openGL gurra Programming 1 10-10-2001 04:36 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:26 PM.

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