My Program in OpenGL on a Linux system (Ubuntu) has the following problem. I am unable to understand.
CODE :
#include <iostream>
#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
int main(void)
{
glewExperimental = GL_TRUE;
if(glewInit() != GLEW_OK)
{
std::cerr<<"GLEW Initialization failed"<<std::endl;
return -1;
}
return 0;
}
ERROR :
/tmp/ccw4KIKB.o: In function `main':
Experimental.cpp:(.text+0x6): undefined reference to `glewExperimental'
Experimental.cpp:(.text+0xc): undefined reference to `glewInit'
collect2: error: ld returned 1 exit status
COMPILING :
g++ Experimental.cpp -lglfw -lGL