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

时间:2013-12-15 23:02:15

标签: c++ windows visual-studio qt nmake

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

关注该主题 - standalone exe in Qt我做了以下事情:

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

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(325) : err
or C2556: 'bool signbit(double)' : overloaded function differs only by return ty
pe from 'int signbit(double)'
c:\qt\qt-everywhere-opensource-src-5.1.1\qtjsbackend\src\3rdparty\v8\src
\win32-math.h(59) : see declaration of 'signbit'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(325) : err
or C2371: 'signbit' : redefinition; different basic types
c:\qt\qt-everywhere-opensource-src-5.1.1\qtjsbackend\src\3rdparty\v8\src
\platform.h(74) : see declaration of 'lrint'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(506) : err
or C2371: 'lrint' : redefinition; different basic types
c:\qt\qt-everywhere-opensource-src-5.1.1\qtjsbackend\src\3rdparty\v8\src
\platform.h(74) : see declaration of 'lrint'
snapshot-empty.cc
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(325) : err
or C2556: 'bool signbit(double)' : overloaded function differs only by return ty
pe from 'int signbit(double)'
c:\qt\qt-everywhere-opensource-src-5.1.1\qtjsbackend\src\3rdparty\v8\src
\win32-math.h(59) : see declaration of 'signbit'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(325) : err
or C2371: 'signbit' : redefinition; different basic types
c:\qt\qt-everywhere-opensource-src-5.1.1\qtjsbackend\src\3rdparty\v8\src
\win32-math.h(59) : see declaration of 'signbit'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(506) : err
or C2556: 'long lrint(double)' : overloaded function differs only by return type
from 'int lrint(double)'
c:\qt\qt-everywhere-opensource-src-5.1.1\qtjsbackend\src\3rdparty\v8\src
\platform.h(74) : see declaration of 'lrint'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(506) : err
or C2371: 'lrint' : redefinition; different basic types
c:\qt\qt-everywhere-opensource-src-5.1.1\qtjsbackend\src\3rdparty\v8\src
\platform.h(74) : see declaration of 'lrint'
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\nmake.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来源。 谢谢!

1 个答案:

答案 0 :(得分:1)

解决。我正在使用VS 2013构建它,它实际上不能正确支持V8模块,所以我使用VS 2012,它在以下配置下运行良好:configure.bat -static -release -no-audio-backend -opengl desktop -opensource -nomake examples -confirm-license