问题
有网友抱怨:在windows下运行 configure,出错:
"QtCore/qconfig.h": No such file or directory
答案
在Windows下编译Qt,首先去看Qt Manual 中的下面两篇文章不为过吧?
- Qt for Windows Requirements
- Installing Qt on Windows
后者无需介绍,网络上类似的东西一把一把的。而前者却被往往被大家忽略了(呵呵,是不是有些不可原谅?)
If you are using a source edition of Qt, you must first install Perl so that the syncqt script invoked by configure can be executed.
这就是最直接的答案了:从源码编译Qt,你必须首先安装perl
。
疑问?
很多人肯定有疑问:为什么网络上那么多的资料中都没提这一点,而且还成功了?
因为大家获取Qt源码的方式不一样!
- 不少人会去下载QtSDK,然后发现里面用的是mingw,他觉得不爽,直接在这个基础上configure
- 有的是直接去源码仓库中抓取Qt的源码
有什么区别?
- Qt 源码的根目录下中没有"include"这个子目录
- 你通过其他方式获取的代码中已经包含了"include"子目录
configure
如果你打开include子目录下面的头文件查看,你会发现真实的代码全部都在src子目录下。
- include 子目录是在configure的过程中生成的,而这个需要perl的参与
当你使用的不是纯正的源码时,include子目录很可能已经包含在里面的,这时就不需要perl参与了。
注:以下文件也是configure时生成的:
- src/corelib/global/qconfig.cpp
- src/corelib/global/qconfig.h
- ...
参考
分享到:
相关推荐
QT configure参数解释 编译Qt源码必备的教程
qt vs2013 静态配置参数 configure -confirm-license -opensource -platform win32-msvc2013
Qt5 configure参数说明文档。Qt5源码VS下编译参考:http://blog.csdn.net/phil2036/article/details/20409535
QT6默认的QWebEngineview是不支持视频播放等功能的,需要自己用源码编译。 1. python2.7.5以上 webengine需要使用2.7,3不支持 2.Bison,Flex 3.GPerf 4.Perl、ruby 5.Node.js 建议12以上版本 6.Visual Studio 2019 7...
QT 5.5.1 VS2015 静态编译 编译参数如下: configure -confirm-license -opensource -platform win32-msvc2015 -debug-and-release -static -prefix "c:\Qt\5.5.1-static-vs2015" -make libs -nomake tests -nomake...
支持OpenSSL,测试无内存泄漏
QT 5.5.1 VS2015 静态编译 编译参数如下: configure -confirm-license -opensource -platform win32-msvc2015 -debug-and-release -static -prefix "c:\Qt\5.5.1-static-vs2015" -make libs -nomake tests -nomake...
使用qt下的Mingw32编码zlib1.2.11,附加编译详细步骤和编译后的LIB、DLL
首先在解压后的OpenSceneGraph-3.4.0文件夹里面新建一个build文件夹,用来存放编译内容,用vs2013打开CMakeLists.txt,在里面加两行代码 SET(DESIRED_QT_VERSION "5.6.2" CACHE STRING "") 5.6.2为安装的QT的版本 ...
3 使用的编译配置命令(极简,博客看完再看此条):configure.bat -static -prefix "D:\Qt\static_qt5" -confirm-license -opensource -release -platform win32-msvc -nomake examples -nomake tests -opengl desktop ...
QT 5.5.1 VS2015 静态编译 编译参数如下: configure -confirm-license -opensource -platform win32-msvc2015 -debug-and-release -static -prefix "c:\Qt\5.5.1-static-vs2015" -make libs -nomake tests -nomake...
2 在CMD中输入输入configure –static –debug-and-release –no-opengl –nomake examples –nomake webkit -prefix 这条命令假设你机器上编译不过,请去掉 -prefix 假设还编译不过请手动敲打这条命令,因为-符号...
MySQL5.5编译工具configure向cmake过渡指南
Qt源码编译./configure -prefix $PWD/qtbase -opensource 报错 ERROR: The OpenGL functionality tests failed ubuntu 14.04 LTS qt-everywhere-opensource-src-5.9.9
qt-opensource-windows-x86-msvc2012-5.6.3 这个是在vs2012中的使用的qt 编绎时使用的命令: configure -prefix d:\win32-msvc2012 -platform win32-msvc2012 -opensource -confirm-license -nomake tests -nomake ...
用于在MinGW环境下编译poppler-qt4。 适用:MinGW 4.8.2 Qt 4.8.6 或 Qt 5 用法:该脚本放置于poppler源代码文件夹下(包含configure),执行该脚本即可进行配置并编译。
QT 5.5.1 VS2015 静态编译 编译参数如下: configure -confirm-license -opensource -platform win32-msvc2015 -debug-and-release -static -prefix "c:\Qt\5.5.1-static-vs2015" -make libs -nomake tests -nomake...
qt交叉编译的配置,configure的配置和与平台有关的qmake.conf
用的VS2008开发工具,在linux与windows下都能编译通过,机能生成动态库也能生成动态链接库
configure.bat -prefix D:\Library\Qt-MSVC\Qt-5.15.2-MSVC2022-32bit-Static -confirm-license -opensource -debug-and-release -static -static-runtime -angle -combined-angle-lib -no-feature-d3d12 -platform ...