Error U1077 return code - c++

I get an error when I try to compile QT. I compile it with the source in static with openssl. I use this tutorial to make the "build" script
C:\Qt\5.8_Static\src\qt-everywhere-opensource-src-5.8.0\qtbase>configure.bat -static -debug-and-release -platform win32-g++ -prefix C:\Qt\5.8_Static\5.8.0 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite -openssl-linked -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests
Please wait while bootstrapping configure ...
<srcbase> = C:/Qt/5.8_Static/src/qt-everywhere-opensource-src-5.8.0/qtbase
<outbase> = C:/Qt/5.8_Static/src/qt-everywhere-opensource-src-5.8.0/qtbase
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. Tous droits réservés.
cl -c -Yc -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 -wd4577 -D
UNICODE -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_U
SE_QSTRINGBUILDER -DQT_VERSION_STR=\"5.8.0\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_M
INOR=8 -DQT_VERSION_PATCH=0 -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\
include\QtCore\5.8.0" -I"..\..\include\QtCore\5.8.0\QtCore" -I"C:\Qt\5.8_Static\
src\qt-everywhere-opensource-src-5.8.0\qtbase\tools\shared" -I"C:\Qt\5.8_Static\
src\qt-everywhere-opensource-src-5.8.0\qtbase\mkspecs\win32-msvc2012" -Fpconfigu
re_pch.pch -Foconfigure_pch.obj -TP C:\Qt\5.8_Static\src\qt-everywhere-opensourc
e-src-5.8.0\qtbase\tools\configure\configure_pch.h
configure_pch.h
c:\qt\5.8_static\src\qt-everywhere-opensource-src-5.8.0\qtbase\include\qtcore\..
/../src/corelib/global/qglobal.h(45): fatal error C1083: Impossible d'ouvrir le
fichier include : 'type_traits' : No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\bin\cl.EXE"' : code retour '0x2'
Stop.

Related

How to build Qt 6.2.2 from source on Windows 10

I've been trying to build Qt 6.2.2 from source. I downloaded the sources package from the online installer but it fails each time, each time with a different error. I've tried a variety of configurations such as:
configure.bat -static -release -platform win32-msvc -opensource -confirm-license -prefix "C:\Qt\6.2.2\Static" -make libs -make tools -nomake examples -nomake tests
configure.bat -static -release -platform win32-msvc -opensource -confirm-license -prefix "C:\Qt\6.2.2\Static" -make libs -make tools -nomake examples -nomake tests -no-icu -no-opengl -no-openssl -skip qtwayland -skip qtquick3d -skip qtquickcontrols2 -skip qtquicktimeline -skip qtshadertools -skip qtdeclarative -skip qtdoc -skip qttranslations -skip qt3d -skip qt5compat -skip qtcharts -skip qtcoap -skip qtdatavis3d -skip qtlottie -skip qtmqtt -skip qtopcua -skip qtscxml -skip qtvirtualkeyboard -skip qtmultimedia -skip qtwebengine -skip qtwebview
configure.bat -static -release -platform win32-msvc -opensource -confirm-license -prefix "C:\Qt\6.2.2\Static" -no-openssl -make libs -make tools -nomake examples -nomake tests
I've tried using x86_x64 Cross Tools Command Prompt for VS 2017, x86_x64 Cross Tools Command Prompt for VS 2019,
and x64 Native Tools Command Prompt for VS 2019
Here is one of the errors I've gotten using all config options then cmake --build .
[1424/8836] Building CXX object
qtbase\src\network\CMakeFiles\Network.dir\Network_autogen\mocs_compilation.cpp.obj
FAILED:
qtbase/src/network/CMakeFiles/Network.dir/Network_autogen/mocs_compilation.cpp.obj
C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1424~1.283\bin\Hostx86\x64\cl.exe
/nologo /TP -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_NETWORK_LIB -
DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -
DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -
DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -
DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_USING_NAMESPACE -
DQT_USE_QSTRINGBUILDER -DQT_USE_SYSTEM_PROXIES -DUNICODE -DWIN32 -DWIN64 -
D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -
D_USE_MATH_DEFINES -D_WIN64 -
IC:\Qt\6.2.2\Src\qtbase\src\network\Network_autogen\include -
IC:\Qt\6.2.2\Src\qtbase\include -IC:\Qt\6.2.2\Src\qtbase\include\QtNetwork -
IC:\Qt\6.2.2\Src\qtbase\src\network -IC:\Qt\6.2.2\Src\qtbase\src\network\kernel -
IC:\Qt\6.2.2\Src\qtbase\include\QtNetwork\6.2.2 -
IC:\Qt\6.2.2\Src\qtbase\include\QtNetwork\6.2.2\QtNetwork -
IC:\Qt\6.2.2\Src\qtbase\src\network\..\3rdparty\zlib\src -
IC:\Qt\6.2.2\Src\qtbase\include\QtCore -IC:\Qt\6.2.2\Src\qtbase\mkspecs\win32-msvc -
IC:\Qt\6.2.2\Src\qtbase\src\corelib -IC:\Qt\6.2.2\Src\qtbase\include\QtCore\6.2.2 -
IC:\Qt\6.2.2\Src\qtbase\include\QtCore\6.2.2\QtCore -IC:\Strawberry\c\include /DWIN32
/D_WINDOWS /DNDEBUG -O2 -MD /W3 /wd4530 /wd4577 -Zc:__cplusplus -permissive- -utf-8 -
FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding
-Zc:externConstexpr -Zc:wchar_t -guard:cf -std:c++17
/YuC:/Qt/6.2.2/Src/qtbase/src/network/CMakeFiles/Network.dir/cmake_pch.hxx
/FpC:/Qt/6.2.2/Src/qtbase/src/network/CMakeFiles/Network.dir/./cmake_pch.cxx.pch
/FIC:/Qt/6.2.2/Src/qtbase/src/network/CMakeFiles/Network.dir/cmake_pch.hxx
/showIncludes
/Foqtbase\src\network\CMakeFiles\Network.dir\Network_autogen\mocs_compilation.cpp.obj
/Fdqtbase\lib\Qt6Network.pdb /FS -c
C:\Qt\6.2.2\Src\qtbase\src\network\Network_autogen\mocs_compilation.cpp
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1764): error C2027:
use of undefined type 'QSslCipherPrivate'
C:\Qt\6.2.2\Src\qtbase\include\QtNetwork\../../src/network/ssl/qsslcipher.h(56):
note: see declaration of 'QSslCipherPrivate'
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1763): note: while
compiling class template member function 'void
std::default_delete<QSslCipherPrivate>::operator ()(_Ty *) noexcept const'
with
[
_Ty=QSslCipherPrivate
]
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1873): note: see
reference to function template instantiation 'void
std::default_delete<QSslCipherPrivate>::operator ()(_Ty *) noexcept const' being
compiled
with
[
_Ty=QSslCipherPrivate
]
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1802): note: see
reference to class template instantiation 'std::default_delete<QSslCipherPrivate>'
being compiled
C:\Qt\6.2.2\Src\qtbase\include\QtNetwork\../../src/network/ssl/qsslcipher.h(87):
note: see reference to class template instantiation
'std::unique_ptr<QSslCipherPrivate,std::default_delete<QSslCipherPrivate>>' being
compiled
C:\Qt\6.2.2\Src\qtbase\include\QtCore\../../src/corelib/kernel/qmetatype.h(2168):
note: see reference to class template instantiation 'std::array<char,38>' being
compiled
C:\Qt\6.2.2\Src\qtbase\src\network\access\qnetworkaccesscache_p.h(127): note: see
reference to function template instantiation 'std::array<char,38>
QtPrivate::typenameHelper<QNetworkAccessCache::CacheableObject*>(void)' being
compiled
C:\Qt\6.2.2\Src\qtbase\include\QtCore\../../src/corelib/kernel/qmetatype.h(2168):
note: see reference to class template instantiation 'std::array<char,28>' being
compiled
C:\Qt\6.2.2\Src\qtbase\include\QtNetwork\../../src/network/access/
qnetworkreply.h(197):
note: see reference to function template instantiation 'std::array<char,28>
QtPrivate::typenameHelper<QNetworkReply::NetworkError>(void)' being compiled
C:\Qt\6.2.2\Src\qtbase\include\QtCore\../../src/corelib/kernel/qmetatype.h(2168):
note:
see reference to class template instantiation 'std::array<char,31>' being compiled
C:\Qt\6.2.2\Src\qtbase\include\QtNetwork\../../src/network/ssl/
qsslpresharedkeyauthentica
tor.h(94): note: see reference to function template instantiation
'std::array<char,31>
QtPrivate::typenameHelper<QSslPreSharedKeyAuthenticator*>(void)' being compiled
C:\Qt\6.2.2\Src\qtbase\include\QtCore\../../src/corelib/kernel/qmetatype.h(2376):
note:
see reference to class template instantiation 'std::array<char,30>' being compiled
C:\Qt\6.2.2\Src\qtbase\include\QtCore\../../src/corelib/kernel/qmetatype.h(1587):
note:
see reference to class template instantiation 'std::array<char,9>' being compiled
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1764): error C2338:
can't
delete an incomplete type
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1765): warning C4150:
deletion of pointer to incomplete type 'QSslCipherPrivate'; no destructor called
C:\Qt\6.2.2\Src\qtbase\include\QtNetwork\../../src/network/ssl/qsslcipher.h(56):
note:
see declaration of 'QSslCipherPrivate'
[1426/8836] Building CXX object
qtbase\src\tools\qvkgen\CMakeFiles\qvkgen.dir\qvkgen.cpp.obj
ninja: build stopped: subcommand failed.
I've also downloaded the 5.15.x source from here which I'm able to build without issues using the first configure command I posted.
I currently have Strawberry Perl 5.32.x, python 3.10, 3.9.x, and Cmake 3.22.1 installed they're all in my path as well. Per this I meet the requirements. I confirmed the path is correct using where <insert_name.exe> which returns:
where perl.exe
C:\Strawberry\perl\bin\perl.exe
where python.exe
C:\Users\MyNAme\AppData\Local\Programs\Python\Python39\python.exe
C:\Users\MyName\AppData\Local\Programs\Python\Python310\python.exe
where cmake.exe
C:\Program Files\CMake\bin\cmake.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe
As I was writing this I kept digging and found a ton of bug reports about this same issue. It seems to all come back to OpenSSL. I grabbed the OpenSSL source, I installed NASM and added it to my path. I configured and built OpenSSL with:
perl Configure VC-WIN64A
nmake all
Once OpenSSL finished reconfigured Qt with it:
configure.bat -prefix "C:\Libraries\QT-Static" -release -platform win32-msvc -opensource -confirm-license -make libs -make tools -nomake examples -nomake tests -I "C:\Program Files\OpenSSL\include\openssl" -L "C:\Program Files\OpenSSL\lib"
This time it shows the following:
Qt Network:
getifaddrs() ........................... no
IPv6 ifname ............................ no
libproxy ............................... no
Schannel ............................... yes
OpenSSL ................................ yes
Qt directly linked to OpenSSL ........ no
OpenSSL 1.1 ............................ yes
DTLS ................................... yes
OCSP-stapling .......................... yes
SCTP ................................... no
Use system proxies ..................... yes
GSSAPI ................................. no
Brotli Decompression Support ........... no
Then ran:
cmake --build . --parallel
It still fails but this time with a lot more errors, once again linking back to the OpenSSL issue. I thought maybe it had to do with the CMAKE_CXX_STANDARD flag so I forced 17 instead of allowing MSVC to force latest but no luck. Has anyone managed to get 6.2.2 to build on windows 10, if so how?
Upgrade your compiler to the latest VS2019 version (16.11) - see also https://bugreports.qt.io/browse/QTBUG-97999

Building Qt 5.6 for Windows Phone arm (error complaining about desktop)

I want to compile Qt 5.6 for Windows Phone (arm). If I configure, it complains about desktop platform. "Compiling Desktop applications for the ARM platform is not supported."
I just want the Windows Phone 8.1 version. Am I missing any configure option ?
C:\Qt\5.6\Src>configure -nomake examples -nomake tests -openssl-linked -I C:\include -L C:\lib\openssl\winphone\x86_arm -opensource -prefix C:\qt-5-6 -confirm-license -xplatform winphone-arm-msvc2013 -release
+ cd qtbase
+ C:\Qt\5.6\Src\qtbase\configure.bat -top-level -nomake examples -nomake tests -openssl-linked -I C:\include -L C:\lib\openssl\winphone\x86_arm -opensource -prefix C:\qt-5-6 -confirm-license -xplatform winphone-arm-msvc2013 -release
This is the Qt for Windows Runtime Open Source Edition.
You have already accepted the terms of the license.
Creating qmake...
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -Fo./ -Fdqmake.pdb -W3 -nologo -O1 /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS -IC:\Qt\5.6\Src\qtbase\qmake -IC:\Qt\5.6\Src\qtbase\qmake\library -IC:\Qt\5.6\Src\qtbase\qmake\generators -IC:\Qt\5.6\Src\qtbase\qmake\generators\unix -IC:\Qt\5.6\Src\qtbase\qmake\generators\win32 -IC:\Qt\5.6\Src\qtbase\qmake\generators\mac -IC:\Qt\5.6\Src\qtbase\qmake\generators\integrity -IC:\Qt\5.6\Src\qtbase\include -IC:\Qt\5.6\Src\qtbase\include\QtCore -IC:\Qt\5.6\Src\qtbase\include\QtCore\5.6.0 -IC:\Qt\5.6\Src\qtbase\include\QtCore\5.6.0\QtCore -I..\src\corelib\global -DHAVE_QCONFIG_CPP -IC:\Qt\5.6\Src\qtbase\mkspecs\win32-msvc2013 -IC:\Qt\5.6\Src\qtbase\tools\shared -DQT_VERSION_STR=\"5.6.0\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=6 -DQT_VERSION_PATCH=0 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DUNICODE -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY -DQT_NO_STANDARDPATHS -c -Yc -Fpqmake_pch.pch -TP C:\Qt\5.6\Src\qtbase\qmake\qmake_pch.h
qmake_pch.h
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\crtdefs.h(404) : fatal error C1189: #error : Compiling Desktop applications for the ARM platform is not supported.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\x86_ARM\cl.EXE"' : return code '0x2'
Stop.
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
del qbitarray.obj qbuffer.obj qcryptographichash.obj qfilesystementry.obj qfilesystemengine.obj qfilesystemengine_win.obj qfilesystemiterator_win.obj qfsfileengine.obj qfsfileengine_iterator.obj qarraydata.obj qbytearray.obj qvsnprintf.obj qbytearraymatcher.obj qdatetime.obj qdir.obj qdiriterator.obj qfiledevice.obj qfile.obj qtemporaryfile.obj qabstractfileengine.obj qfsfileengine_win.obj qsystemlibrary.obj qfileinfo.obj qglobal.obj qhash.obj qiodevice.obj qringbuffer.obj qdebug.obj qlist.obj qlinkedlist.obj qlocale.obj qlocale_tools.obj qlocale_win.obj qmalloc.obj qmap.obj qregexp.obj qtextcodec.obj qutfcodec.obj qstring.obj qstring_compat.obj qstringlist.obj qstringbuilder.obj qsystemerror.obj qtextstream.obj qdatastream.obj quuid.obj qvector.obj qsettings.obj qlibraryinfo.obj qvariant.obj qsettings_win.obj qmetatype.obj qxmlstream.obj qxmlutils.obj qnumeric.obj qlogging.obj qjson.obj qjsondocument.obj qjsonparser.obj qjsonarray.obj qjsonobject.obj qjsonvalue.obj
C:\Qt\5.6\Src\qtbase\qmake\qbitarray.obj konnte nicht gefunden werden
del project.obj main.obj ioutils.obj proitems.obj qmakevfs.obj qmakeglobals.obj qmakeparser.obj qmakeevaluator.obj qmakebuiltins.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj makefiledeps.obj metamakefile.obj xmloutput.obj msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj msvc_objectmodel.obj msbuild_objectmodel.obj registry.obj cesdkhandler.obj
C:\Qt\5.6\Src\qtbase\qmake\project.obj konnte nicht gefunden werden
del qmake_pch.obj
C:\Qt\5.6\Src\qtbase\qmake\qmake_pch.obj konnte nicht gefunden werden
del qmake_pch.pch
C:\Qt\5.6\Src\qtbase\qmake\qmake_pch.pch konnte nicht gefunden werden
del qmake.pdb
C:\Qt\5.6\Src\qtbase\qmake\qmake.pdb konnte nicht gefunden werden
del qmake.ilk
C:\Qt\5.6\Src\qtbase\qmake\qmake.ilk konnte nicht gefunden werden
del qmake.tds
C:\Qt\5.6\Src\qtbase\qmake\qmake.tds konnte nicht gefunden werden
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -Fo./ -Fdqmake.pdb -W3 -nologo -O1 /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS -IC:\Qt\5.6\Src\qtbase\qmake -IC:\Qt\5.6\Src\qtbase\qmake\library -IC:\Qt\5.6\Src\qtbase\qmake\generators -IC:\Qt\5.6\Src\qtbase\qmake\generators\unix -IC:\Qt\5.6\Src\qtbase\qmake\generators\win32 -IC:\Qt\5.6\Src\qtbase\qmake\generators\mac -IC:\Qt\5.6\Src\qtbase\qmake\generators\integrity -IC:\Qt\5.6\Src\qtbase\include -IC:\Qt\5.6\Src\qtbase\include\QtCore -IC:\Qt\5.6\Src\qtbase\include\QtCore\5.6.0 -IC:\Qt\5.6\Src\qtbase\include\QtCore\5.6.0\QtCore -I..\src\corelib\global -DHAVE_QCONFIG_CPP -IC:\Qt\5.6\Src\qtbase\mkspecs\win32-msvc2013 -IC:\Qt\5.6\Src\qtbase\tools\shared -DQT_VERSION_STR=\"5.6.0\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=6 -DQT_VERSION_PATCH=0 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DUNICODE -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY -DQT_NO_STANDARDPATHS -c -Yc -Fpqmake_pch.pch -TP C:\Qt\5.6\Src\qtbase\qmake\qmake_pch.h
qmake_pch.h
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\crtdefs.h(404) : fatal error C1189: #error : Compiling Desktop applications for the ARM platform is not supported.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\x86_ARM\cl.EXE"' : return code '0x2'
Stop.
Building qmake failed, return code 2

Error building Qt 5.3.0

I am trying to compile Qt 5.3.0 to get rid of icu dlls. I have Windows 7 32 bit, MS VS2012. I ran the following command:
configure -nomake examples -nomake tests -opengl desktop -prefix C:\\Qt5.3.0_custom -platform win32-msvc2012 -opensource -c++11 -no-icu
After a large output I got this error:
C:\Qt5.3.0_custom\qtbase\qmake\generators\win32\msvc_nmake.cpp(50) : fatal error
C1083: Cannot open include file: 'windows/registry_p.h': No such file or direct
ory
msvc_vcxproj.cpp
msvc_objectmodel.cpp
C:\Qt5.3.0_custom\qtbase\qmake\generators\win32\msvc_vcproj.cpp(71) : fatal erro
r C1083: Cannot open include file: 'windows/registry_p.h': No such file or direc
tory
msbuild_objectmodel.cpp
cesdkhandler.cpp
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 11.0\VC\BI
N\cl.EXE"' : return code '0x2'
Stop.
Building qmake failed, return code 2
I forgot to execute a batch file, so here is the complete process:
C:\Program Files\Microsoft Visual Studio 11.0\VC\vcvarsall.bat
configure -nomake examples -nomake tests -opengl desktop -prefix C:\\Qt5.3.0_custom -platform win32-msvc2012 -opensource -c++11 -no-icu
nmake

How to build mysql driver for qt?

I read a lot of instructions and tutorials how to do that, and I tried many of that, but 6 hours have gone and it's all the same. Please help...
I know, there are some similar questions on stackoverflow but answers on them doesn't help.
Problem:
I want to build Mysql driver for my qt program. According to instructions I did:
1) set mysql=C:\PROGRA~1\MySQL\MYSQLS~1.6 (full path is C:\Program Files\MySQL\MySQL Server 5.6)
2)
cd C:\Qt_Sources\5.2.1\Src\qtbase\src\plugins\sqldrivers\mysql
qmake -o Makefile "INCLUDEPATH+=%mysql%\include" "LIBS+=%mysql%\lib\libmysql.lib" mysql.pro
mingw32-make
mingw32-make from (C:\MinGW\bin)
After this I got:
mingw32-make -f Makefile.Release all
mingw32-make[1]: Entering directory 'C:/Qt_Sources/5.2.1/Src/qtbase/src/plugins/
sqldrivers/mysql'
Makefile.Release:65: *** missing separator. Stop.
mingw32-make[1]: Leaving directory 'C:/Qt_Sources/5.2.1/Src/qtbase/src/plugins/s
qldrivers/mysql'
Makefile:40: recipe for target 'release-all' failed
mingw32-make: *** [release-all] Error 2
Also I tried nmake from (C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin) and result is:
Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\nmake.exe" -
f Makefile.Release all
Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -nologo -Zm200 -Zc:wchar_t -O2 -MD -GR -W3 -w34100 -w34189 -DUNICO
DE -DWIN32 -DQT_EDITION=QT_EDITION_DESKTOP -DQT_EVAL -DQT_NO_CAST_TO_ASCII -DQT_
NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQ
T_CORE_LIB -DNDEBUG -I"%mysql%\include" -I"C:\Qt\5.2.1\msvc2012\include\QtSql\5.
2.1" -I"C:\Qt\5.2.1\msvc2012\include\QtSql\5.2.1\QtSql" -I"C:\Qt\5.2.1\msvc2012\
include" -I"C:\Qt\5.2.1\msvc2012\include\QtSql" -I"C:\Qt\5.2.1\msvc2012\include\
QtCore\5.2.1" -I"C:\Qt\5.2.1\msvc2012\include\QtCore\5.2.1\QtCore" -I"C:\Qt\5.2.
1\msvc2012\include\QtCore" -I".moc\release" -I"..\..\..\..\mkspecs\win32-msvc201
2" -Fo.obj\release\ #C:\Users\GOODSP~1\AppData\Local\Temp\nmD5C6.tmp
NMAKE : fatal error U1077: 'cl' : return code '0xc0000135'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\bin\nmake.exe"' : return code '0x2'
Stop.
Please explain what I did wrong...
Yes, I finally resolve this issue...
I used qmake for another qt version, for me I think I used qmake from msvc2012, and tried to make it by mingw32-make and nmake (but nmake from visual studio 2011.. maybe this is the problem).
And solution is:
Use qmake from mingw48_32 directory (for me it's: C:\Qt\5.2.1\mingw48_32. Install qt sources with mingw, if you don't have it). After that all works fine with mingw32-make.

Compiler error when building Qt

I am trying to build Qt myself. I checked out everything and want to run configure now. The Visual Studio 2013 compiler is in PATH but I get this error
C:\Users\Philipp\Desktop\Qt>configure -developer-build -opensource -nomake examp
les -nomake tests -opengl desktop
+ cd qtbase
+ C:\Users\Philipp\Desktop\Qt\qtbase\configure.bat -top-level -developer-build -
opensource -nomake examples -nomake tests -opengl desktop
Please wait while bootstrapping configure ...
<srcbase> = C:/Users/Philipp/Desktop/Qt/qtbase
<outbase> = C:/Users/Philipp/Desktop/Qt/qtbase
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -Yc -nologo -Zm200 -Zc:wchar_t -MT -W3 -GR -EHsc -w34100 -w34189
-DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPO
NENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT
_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DCOMMERCIAL_VERSION
-I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\5.2.0" -I"..
\..\include\QtCore\5.2.0\QtCore" -I"C:\Users\Philipp\Desktop\Qt\qtbase\tools\sha
red" -I"C:\Users\Philipp\Desktop\Qt\qtbase\mkspecs\win32-msvc2008" -Fpconfigure_
pch.pch -Foconfigure_pch.obj -TP C:\Users\Philipp\Desktop\Qt\qtbase\tools\config
ure\configure_pch.h
configure_pch.h
c:\users\philipp\desktop\qt\qtbase\include\qtcore\../../src/corelib/global/qglob
al.h(46) : fatal error C1083: Cannot open include file: 'stddef.h': No such file
or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\bin\cl.EXE"' : return code '0x2'
Stop.
Does anyone know how to solve this?
Compiler itself in the PATH variable is not enough, it needs to know where include files and libraries are located.
Check vc++ has PATH variables it uses defined (at least both INCLUDE and LIBPATH).
If not you have two options:
Run configure from Developer Command Prompt (you can find it in the Visual Studio Tools program group).
From any command prompt window run VcVars32.bat batch file (or VsVars32.bat) located in Common7\Tools folder under VS installation directory.