I’m trying to build Qt 5.3 with Visual Studio 2015 (using the Visual Studio 2015 preview version).
I made some minor changes to the win32-msvc2013 mkspec to use the Visual Studio 2015 compiler:
Changed
MSVC_VER = 12.0
QMAKE_COMPILER_DEFINES += _MSC_VER=1800 _WIN32
The same seems to happen when building 5.4.0 RC
to
MSVC_VER = 14.0
QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32
I have created the following build script, which will end up with this config:
configure -platform win32-msvc2013 -prefix c:\Qt\5.3.0.2015\msvc2013 -opensource -confirm-license -c++11 -opengl desktop -nomake examples -nomake tests -qt-sql-sqlite -icu -I C:\Qt\icu_52_1_msvc_2013_32_devel\icu\include -L C:\Qt\icu_52_1_msvc_2013_32_devel\icu\lib -openssl -I C:\Qt\openssl-1.0.1h.VS2013\include -L C:\Qt\openssl-1.0.1h.VS2013\lib -plugin-sql-mysql -I C:\Qt\MySql5.1\include -L C:\Qt\MySql5.1\lib\opt
@rem Set Visual studion 2015 environment
CALL “C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat” x86
@echo on
rem set the intermediate build path
set QT_VERSION=5.3.0
set QT_TARGET=msvc2013
set QT_SRC_PATH=c:\Qt\%QT_VERSION%.2015\src
set QT_BUILD_PATH=c:\Qt\%QT_VERSION%.2015\%QT_TARGET%_build
set QT_INSTALL_PATH=c:\Qt\%QT_VERSION%.2015\%QT_TARGET%
set QMAKESPEC=win32-%QT_TARGET%
rem 3rd party paths
set PYTHON_PATH=C:\Python34
set MYSQLDIR=C:\Qt\MySql5.1
set ICU_PATH=C:\Qt\icu_52_1_msvc_2013_32_devel\icu
set OPENSSL_PATH=C:\Qt\openssl-1.0.1h.VS2013
rem Add 3rd party libs and includes to environment
set LIB=%ICU_PATH%\lib;OPENSSL_PATH\lib;LIB
set INCLUDE=%ICU_PATH%\include;OPENSSL_PATH\include;INCLUDE
rem Set Qt folders and 3rd party apps to path
set PATH=%QT_BUILD_PATH%\qtbase\bin;QT_SRC_PATH\qtrepotools\bin;QT_SRC_PATH\gnuwin32\bin;MYSQLDIR;PYTHON_PATH;ICU_PATH\lib;OPENSSL_PATH\bin;PATH
rem Due to issues with a duplicate header between MySql and Qt, rename the mySql header.
rem Not the nicest way to do this, but is supposed to work fine. Make sure to rename it back when done.
ren MYSQLDIR\include\decimal.h decimal.h__
rem Set compiler to run on 8 cores
set CL=/MP8
md QT_BUILD_PATH
cd QT_BUILD_PATH
rem Configure the Qt build
rem default configuration parameters
rem -platform specifies the build platform
rem -prefix sets the final installation path
rem -opensource identifies the build as opensource license
rem -confirm-license automatically accept the opensource license
rem -c++11 set to c++11 standard
set DEFAULT=-platform QMAKESPEC -prefix QT_INSTALL_PATH -opensource -confirm-license -c++11
rem Build OpenGL instead of ANGLE
set OPENGL=-opengl desktop
rem Examples take some time to build, may be skipped
set SKIP_EXAMPLES=-nomake examples
rem Tests take some time to build, may be skipped
set SKIP_TESTS=-nomake tests
rem SQLite is needed to build QtWebkit
set SQLITE=-qt-sql-sqlite
rem ICU is needed to build QtWebkit
set ICU=-icu -I ICU_PATH\include -L ICU_PATH\lib
rem Build OpenSSL
set OPEN_SSL=-openssl -I OPENSSL_PATH\include -L OPENSSL_PATH\lib
rem build MySql plugin
set MYSQL_PLUGIN=-plugin-sql-mysql -I MYSQLDIR\include -L MYSQLDIR\lib\opt
rem Combine all of the above in the Qt configure command
call QT_SRC_PATH\configure
Compiler output [dropbox.com]
So, as you can see, I’m getting internal compiler errors almost imediately in the build process.
I know that I’m building agains msvc2013 external libraries, but I’m not even getting to the point that they are actually used.
Anyone have any thoughts what might be causing the compiler errors?
I also know that I’m changing the build spec quick and dirty, by adepting the mkspec for msvc2013, but I don’t know how to add a new mkspec to all of the code.
↧