You are not logged in.

#1 2009-08-27 21:20:29

celestialorb
Member
From: Seattle, Washington
Registered: 2009-07-30
Posts: 30

[SOLVED] OpenGL/GLUT problem...

Hey guys,

I've recently been trying to program with OpenGL/GLUT but so far I haven't been having much luck on Arch.  I have a simple program that uses OpenGL just to test whether I've got it working or not, but I seem to be including the wrong files.  Everytime I attempt to compile my program, I get errors claiming that each and every OpenGL/GLUT functions I'm using is an undefined reference (I'm using C++ by the way).  Currently I'm including the GL/gl.h and GL/glut.h files.  I have checked and these two files do exist.  Is there another file I need to include?

Thanks in advance!

Last edited by celestialorb (2009-08-27 21:47:42)

Offline

#2 2009-08-27 21:26:51

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED] OpenGL/GLUT problem...

it would be usefull if you posted the compilation line. i'm sure that you didn't add the right compilation flag.
gcc -o test test.c -lglut

maybe you need -lGL -lGLU. just search on google for a tutorial

Last edited by wonder (2009-08-27 21:27:40)


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2009-08-27 21:47:16

celestialorb
Member
From: Seattle, Washington
Registered: 2009-07-30
Posts: 30

Re: [SOLVED] OpenGL/GLUT problem...

That worked!  Thanks!

The tutorial I was using didn't mention anything about modifying the compiler line, oh well.

Offline

Board footer

Powered by FluxBB