【问题标题】:Errors in building Qt Static 5.3.2构建 Qt Static 5.3.2 时出错
【发布时间】:2015-01-12 15:55:42
【问题描述】:

所以我正在尝试构建 Qt Static 5.3.2。我在http://qt-project.org/wiki/Building_Qt_Desktop_for_Windows_with_MSVC 找到的 windowspowershell 脚本正在自动构建构建。我收到了我不完全理解的错误,因为我已经验证了源中是否存在以下文件,并且我已经检查了它们是否已复制到正确的目录并且它们在那里。

    copy /y C:\Qt\Static\src\qt-everywhere-opensource-src-5.3.2\qtbase\examples\widgets\widgets.pro    C:\Qt\Static\5.3.2\examp
    les\widgets
            1 file(s) copied.
    mingw32-make[3]: Target 'install' not remade because of errors.
    mingw32-make[3]: Leaving directory 'C:/Qt/Static/src/qt-everywhere-opensource-src-5.3.2/qtbase/examples/widgets'
    Makefile:415: recipe for target 'sub-widgets-install_subtargets' failed
    mingw32-make[2]: *** [sub-widgets-install_subtargets] Error 2

copy /y C:\Qt\Static\src\qt-everywhere-opensource-src-5.3.2\qtbase\examples\README C:\Qt\Static\5.3.2\examples
        1 file(s) copied.
mingw32-make[2]: Target 'install' not remade because of errors.
mingw32-make[2]: Leaving directory 'C:/Qt/Static/src/qt-everywhere-opensource-src-5.3.2/qtbase/examples'
Makefile:78: recipe for target 'sub-examples-install_subtargets' failed
mingw32-make[1]: *** [sub-examples-install_subtargets] Error 2

xcopy /s /q /y /i C:\Qt\Static\src\qt-everywhere-opensource-src-5.3.2\qtbase\doc\global C:\Qt\Static\5.3.2\doc\global
59 File(s) copied
mingw32-make[1]: Target 'install' not remade because of errors.
mingw32-make[1]: Leaving directory 'C:/Qt/Static/src/qt-everywhere-opensource-src-5.3.2/qtbase'
Makefile:75: recipe for target 'module-qtbase-install_subtargets' failed
mingw32-make: *** [module-qtbase-install_subtargets] Error 2
mingw32-make: Target 'install' not remade because of errors.

【问题讨论】:

  • 在此之前你没有收到任何错误吗?
  • @SergioMartins - 不,我 CTRL-F 错误,这就是我发现的三个。
  • @law 您找到解决方案了吗?我刚刚用 5.7.0 遇到了同样的问题

标签: c++ qt makefile cmake qmake


【解决方案1】:

尝试输出powershell脚本输出(.\windows-build-qt-static.ps1 > out.txt)并找到带有错误信息的字符串以获得更多理解。

我遇到了同样的最终错误,当我检查脚本输出时,我发现在编译过程中使用了 WATCOM 标头。

...
Environment:
    INCLUDE=
      C:\WATCOM\H
      C:\WATCOM\H\NT
      C:\WATCOM\H\NT\DIRECTX
      C:\WATCOM\H\NT\DDK
...

问题的根源在于设置为 WATCOM 编译器头文件的 INCLUDE 环境变量

INCLUDE

C:\WATCOM\H;C:\WATCOM\H\NT;C:\WATCOM\H\NT\DIRECTX;C:\WATCOM\H\NT\DDK

我已将其修改为指向 MinGw 标头

INCLUDE

C:\Qt\Qt5.3.1\Tools\mingw482_32\i686-w64-mingw32\include;C:\Qt\Qt5.3.1\Tools\mingw482_32\include

这为我解决了问题。

这可能不是您的错误,但重点是,您应该查看脚本输出。

【讨论】:

    【解决方案2】:

    可能是您没有安装 ActivePerl 或 Python。试试吧。它帮助了我。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-04-29
      • 1970-01-01
      • 2011-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-17
      相关资源
      最近更新 更多