I can't link glew with Code::Blocks. I can't compile with even easy code.
Many errors likeundefined reference to 'glewInit'
.
I have glew library is located in /usr/include/GL/glew.h.
From here, i guess i ought to link as follows: -L/usr/local/lib -lglfw3 -pthread -lGLEW -lGLU -lGL -lrt -lXrandr -lXxf86vm -lXi -lXinerama -lX11
, but i don't know how to do this in Code::Blocks.
Code:
#ifdef __APPLE__
#include <GL/glew.h>
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <GLUT/glut.h>
#include <GLM/glm.hpp>
#else
#include "GL/glew.h"
#include "GL/glut.h"
#endif
#include <glm/vec3.hpp> // glm::vec3
#include <glm/vec4.hpp> // glm::vec4
#include <glm/mat4x4.hpp> // glm::mat4
#include <glm/gtc/matrix_transform.hpp> // glm::translate, glm::rotate, glm::scale, glm::perspective
#include <math.h>
Here is a screenshot of currently linked library: