I'm trying to build Qt5.5 with static linking using msvc2015 but I'm having the following errors (actually there's a whole lot of them but I'm only listing a few, they're all quite the same):
K:\Archivos de programa\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(50): error C2873: 'uint_fast64_t': symbol cannot be used in a using-declaration
K:\Archivos de programa\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(52): error C2039: 'intmax_t': is not a member of '`global namespace''
K:\Archivos de programa\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(52): error C2873: 'intmax_t': symbol cannot be used in a using-declaration
K:\Archivos de programa\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(53): error C2039: 'uintmax_t': is not a member of '`global namespace''
K:\Archivos de programa\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(53): error C2873: 'uintmax_t': symbol cannot be used in a using-declaration
NMAKE : fatal error U1077: '"K:\Archivos de programa\Microsoft Visual Studio 14.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"K:\Archivos de programa\Microsoft Visual Studio 14.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.
To configure the compilation, I'm using the following commmand:
configure.bat -confirm-license -static -release -prefix "K:\Qt\msvc2015_static" -platform win32-msvc2015 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite -qt-sql-odbc -opensource -make libs -nomake tools -nomake examples -nomake tests
Anyone has a clue of what is going on?
It is happening because you probably have a very long path for location of source codes. So try to shorten the path for location of codes. For example put them in a short folder name in root of a drive.
Also see: https://stackoverflow.com/a/14862127/2385309
@Bowdzone thanks. this patch worked like a charm for building qt4.8.7
I also needed to append "$(QMAKESPEC)" == "win32-msvc2015" after msvc2013 option in C:\repo\qt\4.8.7\qmake\Makefile.win32( line 27), to get the configure command to work - as noted in building qt for msvc2015 guide lines
BTW I had to build qt4.8.7 as a dependency for 3dslicer OSS package.
p.s I dont have enough points to add-a-comment. This is a validation that the patch worked for me.
This exact error has been discussed in this thread in the Qt forum. It links to an unofficial patch which can be found here.
For future reference, the contents of the patch are listed below:
Run the command prompt as administrator, I did it and worked for me!