gpt4 book ai didi

c++ - 构建 Qt Static 5.3.2 时出错

转载 作者:太空狗 更新时间:2023-10-29 23:20:33 26 4
gpt4 key购买 nike

所以我正在尝试构建 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.

最佳答案

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

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

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

问题的根源是设置为 WATCOM 编译器 header 的 INCLUDE 环境变量

INCLUDE

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

我已将其修改为指向 MinGw header

INCLUDE

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

这为我解决了问题。

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

关于c++ - 构建 Qt Static 5.3.2 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27905920/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com