以前问过很多:如何使用MinGW在Windows上编译GLEW 1.7.0源代码?目标是从C++项目动态链接库。使用MinGW在Windows上构建GLEW 1.7.0
更多信息:我正在与QtCreator合作,使用qmake构建。我在Windows 7上。到目前为止,我已经尝试/看过以下链接。
use posted batch file also tried to replace gcc with g++
static with vc++ libs, build dll.a reuse vc++ .dll
simple stuff using GLEW msvc++ binaries, works on my desktop
Unfortuantely所有张贴的解决方案,结束了我下面的错误消息,当我使用的编译结果我工程中的t:
undefined reference to `[email protected]'
debug/Ex04.o: In function `Z6initGLv':
undefined reference to `[email protected]'
undefined reference to `[email protected]'
debug/Ex04.o: In function `Z8updateGLv':
undefined reference to `[email protected]'
undefined reference to `[email protected]'
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [debug/ecg4.exe] Error 1
mingw32-make.exe: *** [debug] Error 2
我在这个问题上斗智斗勇。我已经双重和三重检查了qmake中的LIBS路径和windows路径变量,以包括glew dll所在的目录。另外qmake的INCLUDEPATH应该没问题。在这里,反正在.pro文件的路径:
LIBS += -L$$quote(C:/mypath/freeglut/lib/) -lfreeglut
LIBS += -L$$quote(C:/mypath/glew-1.7.0/lib/) -lglew32 -lglew32mx
#LIBS+= C:/mypath/glew-1.7.0/lib/libglew32.dll.a
#LIBS+= C:/Programming/glew-1.7.0/lib/libglew32mx.dll.a
#includepath for project and the required libraries
INCLUDEPATH += ./include
INCLUDEPATH += "C:/mypath/glew-1.7.0/include"
INCLUDEPATH += "C:/mypath/freeglut/include"
那么,有没有人在那里谁可以给万无一失一系列关于如何获得GLEW 1.7.0源使用MinGW编译指令?
感谢您的提示,我详细阐述了答案并接受了它。 –
我编辑了答案以删除损坏的链接并替换丢失的信息。希望现在不会太混乱。 –