Archived

This topic is now archived and is closed to further replies.

nempo

opengl, linux and undefined things

Recommended Posts

Recently I reinstalled my gentoo system. Now, when trying to compile anything with glut just gives me a few 'undefined errors' => gcc -o test test.c -lGL -lGLU -lglut /tmp/cceuBNpX.o: In function `main': /tmp/cceuBNpX.o(.text+0x2a): undefined reference to `glutInitDisplay' /tmp/cceuBNpX.o(.text+0x64): undefined reference to `InitGL' /tmp/cceuBNpX.o(.text+0x6b): undefined reference to `DrawGLScene' /tmp/cceuBNpX.o(.text+0x77): undefined reference to `ResizeGLScene' collect2: ld returned 1 exit status I have tried using -L/usr/X11R6/lib and similar with no success. Any clue ? [edited by - nempo on October 20, 2002 10:13:48 AM]

Share this post


Link to post
Share on other sites
The glut*.so* files seems to be missing from my system. I'll try to reinstall glut and see if that helps.

......

Didn't work. However, I do have a few libglut.so* but the problem remains.



[edited by - nempo on October 20, 2002 10:21:35 AM]

Share this post


Link to post
Share on other sites
Are you using Mesa? glut came with mesa/mesa-devel by default. This problem arise defenitely because there''s a missing link.
For InitGL, DrawGLScene.. I assume that it''s your own defined functions, which you might wanna check as well that you don''t just declare the prototypes, but implements it as well.

Share this post


Link to post
Share on other sites
No, I''m not using mesa, atleast not to my or portage:s (gentoos ports like pakage system) knowledge.

I have version 3.7-r2 of glut from http://www.opengl.org/developers/documentation/glut/ if that helps. I have been asking on gentoo:s forum also but no response there.

Share this post


Link to post
Share on other sites
I just solved it. ;D

I''m guessing gcc dislikes that you prototype functions without actually having a function body. glutInitDisplay should actually be glutInitDisplayMode *doh*.

Now it compiles fine. Thanks for your help anyway.

Share this post


Link to post
Share on other sites