
G++ -static-libgcc -static-libstdc++ -o Sample.exe main.o -lopengl32 -lglu32 -lfreeglut -lglew32Ĭ:\Users\Bombshell\EclipseCpp\TTEngine\Sample\Debug/./main.cpp:4: undefined reference to `_glewGenBuffers'Ĭ:\Users\Bombshell\EclipseCpp\TTEngine\Sample\Debug/./main.cpp:11: undefined reference to `_glewDeleteBuffers' I am using a minGW built library, but I've also tried the dll as a library and the pre-built libraries from the glew sourceforgeġ8:15:36 **** Incremental Build of configuration Debug for project Sample **** all signs seem to point to Glew being the best option and some sources claiming it my only option but for the life of me I keep running into errors,Īt the moment this is how the console reports, While using MinGW and GLUT works fine I want to make use of the greater functionality OpenGL offers such as VBO's, Shader Programs, etc. You may not need the last three libraries, but it depends on your version of MinGW.I'm trying to get started with OpenGL in C++ but I'm having constant issues with it, for IDE I have chosen Eclipse with MinGW as my tool chain. G++ glfw.cpp -o glfw - lglfw3 -lopengl32 -lgdi32 -luser32 -lkernel32 You will then need to ensure you link to GLFW and all the relevant libraries, which might be as follows: However it looks like you did not copy the include files to the correct location: the header glfw3.h should be in a directory GLFW in the MinGW include directory. In your case if you correctly moved the include files and libraries you won’t need to specify the locations, but you will still need to specify the libraries. You don’t need to specify the library directory if you include the path to the library when specifying the library. To specify an include directory to search you use the -I option and for libraries you use -l to specify the library and -L to specify the location. When compiling any program you need to tell the compiler the location of any include files or libraries by specifying search directories for these.
