You need to append -lglut to your gcc command.
John-Paul
On Wed, 2006-01-25 at 14:58 -0600, Keith Bertelsen wrote:
> For the Computer Graphics course, we're to be using OpenGL for a good
> amount of our graphics programming. As I would rather avoid having to
> install any Microsoft C++ editor on my machine, I'm trying to get it
> done on Ice. However, I seem to be having difficulties getting even a
> basic program to compile.
>
> The program is as follows:
>
> #include <GL/gl.h>
> #include <GL/glu.h>
> #include <GL/glut.h>
>
> int main(int argc, char** argv)
> {
> glutInit(&argc, argv);
> }
>
>
> The error message I recieve is:
> $ gcc test.cpp -o test
> /tmp/cc8DHSWG.o(.text+0x1e): In function `main':
> : undefined reference to `glutInit'
> /tmp/cc8DHSWG.o(.eh_frame+0x11): undefined reference to
> `__gxx_personality_v0'
> collect2: ld returned 1 exit status
>
>
> This, of course, baffles me, for when I go into /usr/include/GL and grep
> for glutInit in freeglut_std.h, it seems to exist (a series of includes
> brings freeglut_std.h in from glut.h).
>
> I imagine there's something I'm doing wrong along the way, as C++ is not
> my best language, but for the life of me, I can't figure out what. I am
> VNCing into ice.truman.edu:1, but I don't think that would create any
> issues with compiling... Anyone have any good ideas/solutions/input?
>
> Thanks.
>
> -Keith
>
> -----------------------------------------------------------------
> To get off this list, send email to [EMAIL PROTECTED]
> with Subject: unsubscribe
> -----------------------------------------------------------------
>
-----------------------------------------------------------------
To get off this list, send email to [EMAIL PROTECTED]
with Subject: unsubscribe
-----------------------------------------------------------------