Hi All
I’m trying to do some OGL Dev on Turbolinux FUJI 11 (KDE 3.4). When I compile the code, however, it does not seem to be able to find the GL include files. I’ve definitely put references to the right directories in the makefile, so I’m assuming I’ve just miscoded the makefile somehow:
INCLUDE = -I/usr/X11R6/include/
LIBDIR = -L/usr/X11R6/lib
CC = gcc
CFLAGS = $(INCLUDE)
LIBRARIES = -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm
myglprog: myglprog.c
$(CC) $(CFLAGS) -o myglprog myglprog.c $(LIBDIR) $< $(LIBRARIES)
The C Code I’ve used is:
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
void drawscreen()
int main(int argc,char **argv)
{
glutInit(&argc,argv);
glutCreateWindow("TEST");
glutDisplayFunc(drawscreen);
glutMainLoop();
return 0;
}
void drawscreen()
{
glClear(GL_COLOR_BUFFER_BIT);
}
Can anyone tell me where I’m going wrong? Thanks!