Good day.

I try to build Qt 4.8.5 with VS 2015 compiler tools. As the main option I use the algorithm proposed here: Link .

The algorithm is as follows:

  1. Create a folder C:\Qt\4.8.5
  2. I download and unpack the archive with Qt 4.8.5 in this folder ( qt-everywhere-opensource-src-4.8.5.zip )
  3. I install the python patch for which I type the following commands in cmd: pip install patch and -m patch .
  4. I downloaded 02-fix_build_with_msvc2015-45e8f4ee.diff (as in the original link ) and copied it to the C:\Qt\4.8.5 folder
  5. In the same folder ( C:\Qt\4.8.5 ) copied patch.py from the folder ( C:\Python27\lib\site-packages\ ).
  6. I enter the command line from the C:\Qt\4.8.5 folder and execute the command patch.py 02-fix_build_with_msvc2015-45e8f4ee.diff .
  7. Delete patch.py from the directory C:\Qt\4.8.5
  8. I create a new win32-msvc2015 directory in the C:\Qt\4.8.5\mkspecs and copy all the contents of the win32-msvc2012 folder into it.
  9. I edit the contents of the qmake.conf file in the created win32-msvc2015 qmake.conf : enter image description here
  10. Go to the folder C:\Qt\4.8.5\qmake to edit the file Makefile.win32 : First edit Second edit
  11. After that, I launch Visual Studio 2015 command prompt and go to the C:\Qt\4.8.5 folder.
  12. I enter the command configure -platform win32-msvc2015 -prefix C:\Qt-2015\4.8.5\msvc2015 into Visual Studio 2015 command prompt

And I get:

Mistake

And how to get around this error is not yet understood.

PS If anything, the necessary environment variables QTDIR=B:\Qt\4.8.5 , QMAKESPEC=win32-msvc2015 still stand, QMAKESPEC=win32-msvc2015 %QTDIR%\bin to the beginning of PATH .

  • If you are following instructions, then where is the -make nmake in your team? - ixSci
  • Also there they mention in the comments that 4.8.7 supports VS2015, or do you fundamentally need 4.8.5? There are only bug fixes, like. - ixSci
  • @ ixSci Yes, in principle, Qt 4.8.5 is needed. Fortunately, I have already found a solution. - Zakharov Aleksey

1 answer 1

For customization, the solutions proposed by the links Ref1 and Ref2 are used .

The settings algorithm is as follows:

  1. First, we do all the actions on the first link to the line with configure (point 5 on the link)

  2. Set the environment variables: PATH = C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Python27;C:\Qt\4.8.5\bin; , QMAKESPEC = win32-msvc2015 and QTDIR = C:\Qt\4.8.5\ .

  3. We do all the actions for the second link
  4. In the VS2015 console, in the folder where Qt was unpacked, type configure -make nmake -platform win32-msvc2015 (Point 5 of the first link).
  5. In the VS2015 console, in the folder where Qt was unpacked, we write nmake and wait an hour and a half (Item 6 of the first link).