Hey, I’ve got a gentoo(linux distribution) system I am trying to teach myself OpenGL programming with; and when I compile my very basic first step I get:
undefined reference to `glutInit'
my code has an include block like:
#include <stdlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <GL/glx.h>
and my Makefile reads:
CPP = /usr/bin/g++
SDLFLAGS = `sdl-config --cflags --libs`
LIBS = -lGL -lGLU -lXi -lXmu -lglut -lX11
SOURCES = Point.cpp Box.cpp
DEST = boxTest
default:
${CPP} ${SOURCES} -o ${DEST}
clean:
rm -f ${DEST}
My main method reads:
int main(int argc,char** argv){
// initialise glutHey, I've got a gentoo system I am trying to teach myself OpenGL programming with; and when I compile my very basic first step I get:
undefined reference to `glutInit’
my code has an include block like:
#include <stdlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <GL/glx.h>
and my Makefile reads:
CPP = /usr/bin/g++
SDLFLAGS = sdl-config --cflags --libs
LIBS = -lGL -lGLU -lXi -lXmu -lglut -lX11
SOURCES = Point.cpp Box.cpp
DEST = boxTest
default:
${CPP} ${SOURCES} -o ${DEST}
clean:
rm -f ${DEST}
My main method reads:
int main(int argc,char** argv){
// initialise glut
glutInit(&argc,argv);
return 0;
}
I've emerged openglut; so this isn't an issue of Glut not being installed.
glutInit(&argc,argv);
return 0;
}
I’ve installed glut; so this isn’t an issue of Glut not being installed.