2013-12-15 58 views
1

我想在Windows上構建一個靜態版本的Qt 5.1.1,但最終會從nmake收到一堆錯誤。在Windows 7上Qt 5.1.1的靜態構建-nmake和cl error

繼該主題 - 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

已解決。我使用的是VS 2013,它實際上不支持V8模塊,所以我使用VS 2012,可以很好地處理以下配置:configure.bat -static -release -no-audio-backend -opengl desktop -opensource -nomake示例 - 確認許可證