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

1k views Asked by At

I'm trying to build a static version of Qt 5.1.1 on Windows, but eventually receive a bunch of errors from nmake.

Following that topic - standalone exe in Qt I did the following:

The compilation process runs for some while, and eventually throws the following:

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.

Has anyone met such case? I'm not sure why it's complaining about the Qt sources. Thanks!

1

There are 1 answers

0
Aleksandrs Antonovs On

Solved. I was building it with VS 2013, which actually doesn't support V8 module properly, so I got to use VS 2012, that worked fine with the following configuration: configure.bat -static -release -no-audio-backend -opengl desktop -opensource -nomake examples -confirm-license