以前問過很多:如何使用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編譯指令?
感謝您的提示,我詳細闡述了答案並接受了它。 –
我編輯了答案以刪除損壞的鏈接並替換丟失的信息。希望現在不會太混亂。 –