[Gllug] Makefile for OpenGL / GLUT

Henry Gilbert henry.gilbert at gmail.com
Fri Jul 18 13:59:27 UTC 2008


Ok I've tried changing it to:

%INCPATH = -I/usr/X11R6/include/
%LIBS = -lglut -lGLU -lGL -lm -lpthread
%LIBDIR = -L/usr/lib /usr/X11R6/lib/
%:%.c
        gcc $(INCPATH) $(LIBDIR) $^ $(LIBS) -o $@
%:%.cpp
        g++ $(INCPATH) $(LIBDIR) $^ $(LIBS) -o $@

and now it seems kind of closer, lots of error but that is because of
missing libraries:

ie:

$ make ExemploGLSL
g++   ExemploGLSL.cpp  -o ExemploGLSL
ExemploGLSL.cpp:25:21: error: GL/glew.h: No such file or directory
ExemploGLSL.cpp:26:21: error: bibutil.h: No such file or directory
ExemploGLSL.cpp:32: error: 'GLfloat' does not name a type
ExemploGLSL.cpp:33: error: 'GLfloat' does not name a type
ExemploGLSL.cpp:34: error: 'GLfloat' does not name a type
ExemploGLSL.cpp:35: error: 'GLfloat' does not name a type
.. and so on

regards

Henry
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list