I have a problem when using the OpenGL Loader Generator , which when I try to compile my code does not work. It throws an error referring to an undefined reference to any opengl function that I use, for example gl :: BindBuffer, gl :: GenBuffers, etc. I am using pointer_cpp / func_cpp style.
My simple code that I use is
#include "gl_core_3_3.hpp" #include <GL/glfw.h> int main(int argc, char *argv[]) { glfwInit(); glfwOpenWindow(1024, 768, 0, 0, 0, 0, 0, 0, GLFW_WINDOW); gl::exts::LoadTest didLoad = gl::sys::LoadFunctions(); if(!didLoad) { glfwTerminate(); return 1; } return 0; }
When I compile this, it says an undefined link to gl :: sys :: LoadFunctions. The command I use to compile is
g++ main.cpp -lglfw -lGL -lGLU
I am on Arch Linux and use Vim with clang as my IDE.
source share