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?
All you need is to -L/path/to/atual/lib
I had rewritten the program to understand how it works. And instead of glvertex3f it should be glVertex3f. :rolleyes:
|All times are GMT -5. The time now is 10:50 PM.|