gorded
May 24th, 2008, 11:43 PM
Hey I just started using opengl on linux and decide to delve into GLSL, but when i compile my program that links my shaders to a program object. i get
g++ -c -g -I/usr/include/ -I./ rasta.cpp
rasta.cpp: In function ‘void Init(int, char**)’:
rasta.cpp:43: error: ‘glCreateProgram’ was not declared in this scope
rasta.cpp:44: error: ‘glCreateShader’ was not declared in this scope
rasta.cpp:47: warning: deprecated conversion from string constant to ‘char*’
rasta.cpp:48: warning: deprecated conversion from string constant to ‘char*’
rasta.cpp:50: error: ‘glShaderSource’ was not declared in this scope
rasta.cpp:53: error: ‘glCompileShader’ was not declared in this scope
rasta.cpp:56: error: ‘glAttachShader’ was not declared in this scope
rasta.cpp:59: error: ‘glLinkProgram’ was not declared in this scope
rasta.cpp:60: error: ‘glUseProgram’ was not declared in this scope
i include : Gl/gl.h Gl/glu.h Gl/glut.h Gl/glext.h
glext.h has the forward declaration for all of the function i use. But i dont think its being included. I think its a problem with my makefile, since i am horrible at making them(no pun intended).
Here is my Makefile and Make.config any help is greatly appreciated thanks :D
include Make.config
OBJS = rasta.o
TARGET = rasta
all: rasta
rasta: rasta.cpp
$(CC) $(CFLAGS) rasta.cpp
$(CC) $(CFLAGS) $(OBJS) $(LFLAGS) -o $(TARGET)
CC = g++
CFLAGS = -c -g -I/usr/include/ -I./
LFLAGS = -lGL -lglut -lm
g++ -c -g -I/usr/include/ -I./ rasta.cpp
rasta.cpp: In function ‘void Init(int, char**)’:
rasta.cpp:43: error: ‘glCreateProgram’ was not declared in this scope
rasta.cpp:44: error: ‘glCreateShader’ was not declared in this scope
rasta.cpp:47: warning: deprecated conversion from string constant to ‘char*’
rasta.cpp:48: warning: deprecated conversion from string constant to ‘char*’
rasta.cpp:50: error: ‘glShaderSource’ was not declared in this scope
rasta.cpp:53: error: ‘glCompileShader’ was not declared in this scope
rasta.cpp:56: error: ‘glAttachShader’ was not declared in this scope
rasta.cpp:59: error: ‘glLinkProgram’ was not declared in this scope
rasta.cpp:60: error: ‘glUseProgram’ was not declared in this scope
i include : Gl/gl.h Gl/glu.h Gl/glut.h Gl/glext.h
glext.h has the forward declaration for all of the function i use. But i dont think its being included. I think its a problem with my makefile, since i am horrible at making them(no pun intended).
Here is my Makefile and Make.config any help is greatly appreciated thanks :D
include Make.config
OBJS = rasta.o
TARGET = rasta
all: rasta
rasta: rasta.cpp
$(CC) $(CFLAGS) rasta.cpp
$(CC) $(CFLAGS) $(OBJS) $(LFLAGS) -o $(TARGET)
CC = g++
CFLAGS = -c -g -I/usr/include/ -I./
LFLAGS = -lGL -lglut -lm