在win7-64bit msvc2010上构建Qt 5.4.0,每次都失败。

时间:2022-11-20 04:50:05

I download qt-everywhere-opensource-src-5.4.0.zip and jom_1_0_14.zip and install ActivePerl, python2.7.9, ruby 2.1.5 from Qt website also download icu and unpack to c:\icu

我下载qt-everywhere-opensource-src-5.4.0。zip和jom_1_0_14。从Qt网站上下载并安装ActivePerl、python2.7.9、ruby 2.1.5,还可以下载icu和unpack到c:\icu。

I'm trying to build Qt 5.4.0 by following command

我试图通过下面的命令来构建Qt 5.4.0。

c:\Qt\5.4.0>configure -prefix %CD%\qtbase -debug-and-release -icu -I c:\icu\include -L c:\icu\lib64 -opensource -platform win32-msvc2010

and failed everytime

和失败的每次

here's some error message

这里有一些错误消息

c:\qt\5.4.0\qtbase\src\corelib\tools\qcollator_p.h(52) : fatal error C1083: Cannot open include file: 'unicode/ucol.h': No such file or directory
c:\qt\5.4.0\qtbase\src\corelib\tools\qtimezoneprivate_p.h(53) : fatal error C1083: Cannot open include file: 'unicode/ucal.h': No such file or directory
tools\qlocale_icu.cpp(40) : fatal error C1083: Cannot open include file: 'unicode/uloc.h': No such file or directory
c:\qt\5.4.0\qtbase\src\corelib\tools\qcollator_p.h(52) : fatal error C1083: Cannot open include file: 'unicode/ucol.h': No such file or directory
jom: C:\Qt\5.4.0\qtbase\src\corelib\Makefile.Debug [.obj\debug\qtextboundaryfinder.obj] Error 2

jom: C:\Qt\5.4.0\qtbase\src\corelib\Makefile [debug-all] Error 2
jom: C:\Qt\5.4.0\qtbase\src\Makefile [sub-corelib-make_first] Error 2
jom: C:\Qt\5.4.0\qtbase\Makefile [sub-src-make_first] Error 2
jom: C:\Qt\5.4.0\Makefile [module-qtbase-make_first] Error 2

I know window sdk 7.1 had some bug and might cause this, so I followed the following steps

我知道windows sdk 7.1有一些bug,可能会导致这个问题,所以我遵循以下步骤。

  1. uninstall visual studio 2010 x86/x64 redistribute
  2. 卸载visual studio 2010 x86/x64重新分布。
  3. install window sdk v7.1
  4. 窗户安装sdk v7.1
  5. install visual studio 2010 x86/x64 redistribute
  6. 安装visual studio 2010 x86/x64重新分布。
  7. repair visual studio 2010 sp1
  8. 修复visual studio 2010 sp1。

and then using "visual studio x64 win64 command prompt" to used these command

然后使用“visual studio x64 win64命令提示符”来使用这些命令。

c:\Qt\5.4.0>configure -prefix %CD%\qtbase -debug-and-release -icu -I c:\icu\include -L c:\icu\lib64 -opensource -platform win32-msvc2010
c:\Qt\jom\jom.exe -j 10

I also download qt-everywhere-opensource-src-5.1.0 and had same problem, so I think there must be something needs to be done but ain't done. Can anyone give me some help or advice , thanks!

我还下载了qt- all -opensource-src-5.1.0,并且有同样的问题,所以我认为必须要做一些事情,但是没有完成。谁能给我一些帮助或建议,谢谢!

2 个解决方案

#1


2  

Cannot open include file: 'unicode/ucol.h': No such file or directory    

This suggests that it cannot find the ICU headers.

这表明它无法找到ICU头。

I'd recommend to first make sure make sure that the path to the ICU include directory is right. If the problem persists, try build without ICU.

我建议首先确保在ICU的路径包括目录是正确的。如果问题仍然存在,尝试在没有ICU的情况下构建。

#2


-1  

From the Qt website:

Qt的网站:

On Windows, they need to be manually installed and the "include" and "lib" folders of the ICU installation must be appended to the INCLUDE and LIB environment variables after calling the Windows SDK setup script. The "bin" folder of the ICU installation should be appended to the PATH environment variable in order to for the DLLs to be found at run-time.

在Windows上,他们需要手动安装,在调用Windows SDK安装脚本后,必须将ICU安装的“include”和“lib”文件夹附加到include和lib环境变量中。应该将ICU安装的“bin”文件夹添加到PATH环境变量中,以便在运行时找到dll。

#1


2  

Cannot open include file: 'unicode/ucol.h': No such file or directory    

This suggests that it cannot find the ICU headers.

这表明它无法找到ICU头。

I'd recommend to first make sure make sure that the path to the ICU include directory is right. If the problem persists, try build without ICU.

我建议首先确保在ICU的路径包括目录是正确的。如果问题仍然存在,尝试在没有ICU的情况下构建。

#2


-1  

From the Qt website:

Qt的网站:

On Windows, they need to be manually installed and the "include" and "lib" folders of the ICU installation must be appended to the INCLUDE and LIB environment variables after calling the Windows SDK setup script. The "bin" folder of the ICU installation should be appended to the PATH environment variable in order to for the DLLs to be found at run-time.

在Windows上,他们需要手动安装,在调用Windows SDK安装脚本后,必须将ICU安装的“include”和“lib”文件夹附加到include和lib环境变量中。应该将ICU安装的“bin”文件夹添加到PATH环境变量中,以便在运行时找到dll。