在windows 7上静态构建Qt 5.1.1-nmake和cl错误

Static build of Qt 5.1.1 on windows 7 - nmake and cl error

本文关键字:1-nmake cl 错误 Qt windows 静态 构建      更新时间:2023-10-16

我试图在Windows上构建Qt 5.1.1的静态版本,但最终收到了nmake的一堆错误。

在Qt中的独立exe主题之后,我做了以下操作:

  • 下载的Qt源代码(http://download.qt-project.org/official_releases/qt/5.1/5.1.1/single/qt-everywhere-opensource-src-5.1.1.zip)
  • 配置执行如下:config.bat-static-release-无音频后端-opengl桌面-opensource-confirm license
  • 从MS Visual Studio命令行运行nmake

编译过程运行了一段时间,最终抛出以下内容:

C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDEmath.h(325) : err
or C2556: 'bool signbit(double)' : overloaded function differs only by return ty
pe from 'int signbit(double)'
c:qtqt-everywhere-opensource-src-5.1.1qtjsbackendsrc3rdpartyv8src
win32-math.h(59) : see declaration of 'signbit'
C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDEmath.h(325) : err
or C2371: 'signbit' : redefinition; different basic types
c:qtqt-everywhere-opensource-src-5.1.1qtjsbackendsrc3rdpartyv8src
platform.h(74) : see declaration of 'lrint'
C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDEmath.h(506) : err
or C2371: 'lrint' : redefinition; different basic types
c:qtqt-everywhere-opensource-src-5.1.1qtjsbackendsrc3rdpartyv8src
platform.h(74) : see declaration of 'lrint'
snapshot-empty.cc
C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDEmath.h(325) : err
or C2556: 'bool signbit(double)' : overloaded function differs only by return ty
pe from 'int signbit(double)'
c:qtqt-everywhere-opensource-src-5.1.1qtjsbackendsrc3rdpartyv8src
win32-math.h(59) : see declaration of 'signbit'
C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDEmath.h(325) : err
or C2371: 'signbit' : redefinition; different basic types
c:qtqt-everywhere-opensource-src-5.1.1qtjsbackendsrc3rdpartyv8src
win32-math.h(59) : see declaration of 'signbit'
C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDEmath.h(506) : err
or C2556: 'long lrint(double)' : overloaded function differs only by return type
from 'int lrint(double)'
c:qtqt-everywhere-opensource-src-5.1.1qtjsbackendsrc3rdpartyv8src
platform.h(74) : see declaration of 'lrint'
C:Program Files (x86)Microsoft Visual Studio 12.0VCINCLUDEmath.h(506) : err
or C2371: 'lrint' : redefinition; different basic types
c:qtqt-everywhere-opensource-src-5.1.1qtjsbackendsrc3rdpartyv8src
platform.h(74) : see declaration of 'lrint'
Generating Code...
NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio 12.0
VCBINcl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio 12.0
VCBINnmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

有人见过这样的案子吗?我不知道它为什么抱怨Qt的消息来源。谢谢

已解决。我用VS2013构建它,它实际上不支持V8模块,所以我使用了VS2012,它在以下配置下运行良好:config.bat-static-release-no audio backend-opengl桌面-opensource-nomake examples-confirm license