• 8975阅读
  • 5回复

[提问]mingw32编译QT5 [复制链接]

上一主题 下一主题
离线zzh
 

只看楼主 倒序阅读 楼主  发表于: 2012-12-22
我的操作系统是WIN 8 64位的,编译器用MINGW32 ,安装了PERL、 PYTHON、 ICU、 OPENSSL等


之后:



C:\>d:


D:\>cd qt


D:\qt>p


D:\qt>set path=D:\Perl64\site\bin;D:\Perl64\bin;C:\Program Files (x86)\AMD APP\b
in\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\WINDOWS\system32;C:\WINDOWS;
C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\Program
Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Kits\8
.0\Windows Performance Toolkit\;D:\Python33;D:\icu\bin;D:\qt\gnuwin32\bin;D:\qt\
qtbase;D:\qt\qtbase\bin;D:\MinGW\bin;D:\OpenSSL\bin;


D:\qt>configure -release -qt-sql-sqlite -qt-zlib -qt-libpng -qt-libjpeg -icu -I
D:\icu\include -L D:\icu\lib -no-angle -openssl -I D:\OpenSSL\include -L D:\Open
SSL\lib -platform win32-g++
然后,MINGW32-MAKE

g++ -c -include .obj\release_shared\qt_gui_pch.h -pipe -fno-keep-inline-dllexpor
t -O2 -std=c++0x -Wall -Wextra -fno-exceptions -frtti -DUNICODE -DQT_NO_USING_NA
MESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAS
T_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT
_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQT_USE_BUNDLED_LIBPNG
-DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_NO_EXCE
PTIONS -I. -I"D:\icu\include" -I"D:\OpenSSL\include" -I"..\..\include" -I"..\..\
include\QtGui" -I"..\..\include\QtGui\5.0.0" -I"..\..\include\QtGui\5.0.0\QtGui"
-I"tmp" -I"image" -I"..\3rdparty\libpng" -I"..\3rdparty\zlib" -I"..\3rdparty\zl
ib" -I"..\..\include\QtCore" -I"..\..\include\QtCore\5.0.0" -I"..\..\include\QtC
ore\5.0.0\QtCore" -I".moc\release_shared" -I"..\..\mkspecs\win32-g++" -o .obj\re
lease_shared\qgenericplugin.o kernel\qgenericplugin.cpp
g++ -c -include .obj\release_shared\qt_gui_pch.h -pipe -fno-keep-inline-dllexpor
t -O2 -std=c++0x -Wall -Wextra -fno-exceptions -frtti -DUNICODE -DQT_NO_USING_NA
MESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAS
T_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT
_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQT_USE_BUNDLED_LIBPNG
-DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_NO_EXCE
PTIONS -I. -I"D:\icu\include" -I"D:\OpenSSL\include" -I"..\..\include" -I"..\..\
include\QtGui" -I"..\..\include\QtGui\5.0.0" -I"..\..\include\QtGui\5.0.0\QtGui"
-I"tmp" -I"image" -I"..\3rdparty\libpng" -I"..\3rdparty\zlib" -I"..\3rdparty\zl
ib" -I"..\..\include\QtCore" -I"..\..\include\QtCore\5.0.0" -I"..\..\include\QtC
ore\5.0.0\QtCore" -I".moc\release_shared" -I"..\..\mkspecs\win32-g++" -o .obj\re
lease_shared\qwindowsysteminterface.o kernel\qwindowsysteminterface.cpp
In file included from ..\..\include/QtGui/qopengl.h:1:0,
                 from ..\..\include\QtGui\5.0.0\QtGui/qpa/../../../../../src/gui
/kernel/qplatformopenglcontext.h:59,
                 from ..\..\include\QtGui\5.0.0\QtGui/qpa/qplatformopenglcontext
.h:1,
                 from ..\..\include\QtGui\5.0.0\QtGui/qpa/../../../../../src/gui
/kernel/qplatformwindow.h:59,
                 from ..\..\include\QtGui\5.0.0\QtGui/qpa/qplatformwindow.h:1,
                 from kernel\qwindowsysteminterface.cpp:42:
..\..\include/QtGui/../../src/gui/opengl/qopengl.h:55:25: 致命错误:GLES2/gl2.h
:No such file or directory


Makefile.Release:13338: recipe for target '.obj/release_shared/qwindowsysteminte
rface.o' failed
mingw32-make[3]: *** [.obj/release_shared/qwindowsysteminterface.o] Error 1
mingw32-make[3]: Leaving directory 'D:/qt/qtbase/src/gui'
Makefile:34: recipe for target 'release' failed
mingw32-make[2]: *** [release] Error 2
mingw32-make[2]: Leaving directory 'D:/qt/qtbase/src/gui'
Makefile:251: recipe for target 'sub-gui-make_first' failed
mingw32-make[1]: *** [sub-gui-make_first] Error 2
mingw32-make[1]: Leaving directory 'D:/qt/qtbase/src'
Makefile:40: recipe for target 'sub-src-make_first' failed
mingw32-make: *** [sub-src-make_first] Error 2


弹出了这样的错误,可是,在QT5源代码里,GLES2/gl2.h确实存在呀。


大家都是怎么编译的呀?



离线呆呆很呆
只看该作者 1楼 发表于: 2012-12-22
configure -no-opengl
mingw32-make
就行了
离线roywillow

只看该作者 2楼 发表于: 2012-12-22
回 楼主(zzh) 的帖子
或者用-opengl desktop参数
专业维修核潜艇,回收二手航母、二手航天飞机,大修核反应堆,拆洗导弹发动机更换机油,无人侦察机手动挡改自动,航天飞机保养换三滤,飞碟外太空年检 ,各型号导弹加装迎宾踏板,高空作业擦洗卫星表面除尘、打蜡及抛光,东风全系列巡航导弹。并提供原子对撞机。量大从优,有正规发票。
离线zzh

只看该作者 3楼 发表于: 2012-12-23
Re:回 楼主(zzh) 的帖子
引用第2楼roywillow于2012-12-22 22:38发表的 回 楼主(zzh) 的帖子 :
或者用-opengl desktop参数

好的,谢谢,我再试试
离线zzh

只看该作者 4楼 发表于: 2012-12-23
引用第1楼呆呆很呆于2012-12-22 21:10发表的  :
configure -no-opengl
mingw32-make
就行了

不要OPENGL怎么行,我还要用呢
离线呆呆很呆
只看该作者 5楼 发表于: 2012-12-23
回 4楼(zzh) 的帖子
我做文本编辑器 用不着那个
快速回复
限100 字节
 
上一个 下一个