【问题标题】:errors compiling Qt with Intel C++ compiler for Win32, what am I doing wrong?使用适用于 Win32 的英特尔 C++ 编译器编译 Qt 时出错,我做错了什么?
【发布时间】:2011-06-28 09:58:28
【问题描述】:

我打开了 MSVS 2010 命令提示符,从那里我从 Intel Parallel Studio(它为 ICC 设置环境)运行 ips-vars.cmd,我从那里调用:

configure -ltcg -debug-and-release  -graphicssystem opengl -mp -platform win32-icc -no-s60

得到了这个:

Creating qmake...

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

    icl -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch -c -Fo./  -W3 -nologo -O2    -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -
    Igenerators\symbian  -IH:\Alex\Alex\Work\Qt\4.7.3\include -IH:\Alex\Alex\Work\Qt\4.7.3\include\QtCore  -IH:\Alex\Alex\Work\Qt\4.7.3\include -IH:\Alex\Alex\Work\
    Qt\4.7.3\include\QtCore  -IH:\Alex\Alex\Work\Qt\4.7.3\src\corelib\global  -IH:\Alex\Alex\Work\Qt\4.7.3\src\corelib\xml  -IH:\Alex\Alex\Work\Qt\4.7.3\mkspecs\win
    32-icc   -IH:\Alex\Alex\Work\Qt\4.7.3\tools\shared  -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL  -DQT_NO_COMPRESS -DUNICO
    DE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD  -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED  -DQLIBRARYINFO_EP
    OCROOT /Zc:forScope -DQMAKE_OPENSOURCE_EDITION H:\Alex\Alex\Work\Qt\4.7.3\src\corelib\plugin\qsystemlibrary.cpp
    qsystemlibrary.cpp
    Catastrophic error: cannot open precompiled header file "qmake_pch.pchi"

    compilation aborted for H:\Alex\Alex\Work\Qt\4.7.3\src\corelib\plugin\qsystemlibrary.cpp (code 4)
    NMAKE : fatal error U1077: '"C:\Program Files\Intel\Parallel Studio 2011\Composer\bin\ia32\icl.EXE"' : return code '0x4'
    Stop.

任何想法有什么问题吗? 感谢您的观看。

【问题讨论】:

    标签: c++ qt compilation intel


    【解决方案1】:

    选项-Yu 表示“使用预编译头”。

    您似乎还没有首先创建预编译文件 (-Yc)。而且那个可能不应该以.h结尾。

    【讨论】:

    • 感谢您的提示!您是否知道 Qt 中指定的编译器命令行参数在哪里? -Yc 在 qmake.conf 中不存在
    • @Violet - 抱歉,我不知道 QT,只知道编译器。但是您的命令中确实有一个.pch 文件。那是你应该使用的吗?
    • 我不理解预编译的头文件(现在用谷歌搜索),到目前为止我唯一注意到的是那里没有 *.pch 文件。
    • @Violet - 这是一种编译大型标头并保存结果的方法。然后您可以将其重用于其他编译,并可能节省一些编译时间。见这里MSDN Precompiled Header Files。在 MSVC 模式下对 Intel 编译器的工作方式相同。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-21
    • 2020-02-05
    • 1970-01-01
    • 2014-02-19
    • 2014-06-14
    • 1970-01-01
    相关资源
    最近更新 更多