This was asked quite a bit earlier: How to compile the GLEW 1.7.0 source on Windows using MinGW? The goal is to dynamically link the library to a C ++ project.
Additional info: I work with QtCreator, ergo uses qmake to create. I am on Windows 7. So far, I have tried / looked at the following links.
The used batch file used also tried to replace gcc with g ++
static with vC ++ libs, build dll.a reuse vC ++. dll
Get MSYS launched makefile
Initial Issues Information
simple things using msvc ++ GLEW binaries, works on my desktop
Unfortunately, all published solutions end with the following error messages for me when I use the compiled results in my project:
undefined reference to ` glDrawElements@16 ' debug/Ex04.o: In function `Z6initGLv': undefined reference to ` glClearColor@16 ' undefined reference to ` glEnable@4 ' debug/Ex04.o: In function `Z8updateGLv': undefined reference to ` glClear@4 ' undefined reference to ` glViewport@16 ' collect2: ld returned 1 exit status mingw32-make.exe[1]: *** [debug/ecg4.exe] Error 1 mingw32-make.exe: *** [debug] Error 2
At the end of my mind, I consider this problem. I double and triple checked the LIBS path in qmake and the Windows path variable to include the directory where glew dll is located. Also qmake INCLUDEPATH should be ok. Here the paths in the .pro file are always:
LIBS += -L$$quote(C:/mypath/freeglut/lib/) -lfreeglut LIBS += -L$$quote(C:/mypath/glew-1.7.0/lib/) -lglew32 -lglew32mx
So is there someone who could give a reliable set of instructions on how to get the GLEW 1.7.0 source compiled with MinGW?
Moritz jasper
source share