The problem is in the title, I\'ll try to list what I\'ve already tried and so on below.
First off, in my understanding, in order to use OpenGL 4.0 on windows you mu
Try adding -lopengl32 last on the line to compile your program and see if it helps.
Argument order is significant with gcc
linker options.
Try this:
${G++} -DFREEGLUT_STATIC -DGLEW_STATIC -m32 main.cpp -o main.exe -I ${ROOTPATH}/include -L ${ROOTPATH}/lib -lopengl32 -lwinmm -lgdi32 -lglew32 -static -lfreeglut_static
Also, I don't think there's a double-dash --static
option, just -static
.
And on win32 you're going to need a successful glewInit()
before your glEnableVertexAttribArray()
function pointer will be valid. After checking your core version and/or extension, of course :)