Cannot find GL Library Files

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
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)
    return 0;

void drawscreen()

Can anyone tell me where I’m going wrong? Thanks!

don’t want to bother you, but are you ab-so-lutely sure the include files are in /usr/X11R6/include/ ? in most systems they should be in /usr/include

apart from that, the makefile looks ok to me. but since i’m not 100% sure, try

gcc -c myglprog.c -I/usr/X11R6/include/

on the command line and post the output here.

btw: your predeclaration

void drawscreen()

is missing a semicolon.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.