How to build latest Qt from Git repository on windows?

落花浮王杯 提交于 2019-12-24 02:51:10

问题


I have tried to build a latest Qt from the Git repository on Windows with the following commands:

mkdir c:\qt\latest
cd c:\qt\latest
git clone git://gitorious.org/qt/qt.git
cd qt
set PATH=%PATH%;c:\qt\latest\qt\bin
configure.exe

Unfortunately configuration stops very early with error the following error:

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation.  All rights reserved.

cl -c -Foproject.obj  -W3 -nologo -O2  -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\symbian  -IC:\Qt\latest\qt\include -IC:\Qt\latest\qt\include\QtCore  -IC:\Qt\latest\qt\include -IC:\Qt\latest\qt\include\QtCore  -IC:\Qt\latest\qt\src\corelib\global  -IC:\Qt\latest\qt\src\corelib\xml  -IC:\Qt\latest\qt\mkspecs\win32-msvc2008   -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL  -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD  -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED   -DQMAKE_OPENSOURCE_EDITION project.cpp
project.cpp c:\qt\latest\qt\qmake\project.h(45) : fatal error C1083: Cannot open include file: 'qstringlist.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.EXE"' : return code '0x2' Stop.
Building qmake failed, return code 2

I have sucessfully built Qt (with the same commands) from source code archive on qt.nokia.com.

Is there any difference between the code in the source code archive and the Git repository? Is the Git repository broken/incomplete, or do I need to use additional or different commands to build it?


回答1:


I have two ideas:

1) Try to build in c:\qt\latest\qt\ subfolder. For example:

mkdir qt-build
cd qt-build
..\qt\configure
(n)make

2) As mentioned here may be you need Perl.

Make sure that you have Perl installed and that it is working. If configure complains about not being able to find headers. It means that syncqt, a program run by configure could not find your Perl installation.

Try to install ActivePerl i.e.



来源:https://stackoverflow.com/questions/2084766/how-to-build-latest-qt-from-git-repository-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!