Project needs to use qt5.9.0 msvc2015.
1, installation: the vs2015, qt5.9.0 can refer to:. Https://blog.csdn.net/HW140701/article/details/82917808
2. After installation is complete, there are some problems.
1)msvc-version.conf loaded but QMAKE_MSC_VER isn't set
Solution: Reference https://blog.csdn.net/caoshangpa/article/details/79185117
Open the file D: \ Qt \ Qt5.10.0 \ 5.10.0 \ msvc2015 \ mkspecs \ common \ msvc-version.conf
Version added thereto QMAKE_MSC_VER = 1900, as shown below.
2)D:/QT/QT5.9.0/5.9/MSVC2015/mkspecs/features/toolchain.prf:129: Variable QMAKE_CXX.COMPILER_MACROS is not defined.
- Project ERROR: msvc-version.conf loaded but QMAKE_MSC_VER isn't set
Solution: Reference: https://www.zhihu.com/question/61690610
link: https: //www.zhihu.com/question/61690610/answer/195816694
Source: know almost
copyrighted by the author. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.
Google "qt vs tools can not open *.pro":Configure should unset QMAKESPEC :
- Double-click to open the C: \ Program Files (x86) \ in the Microsoft Visual Studio 14.0 \ Common7 \ Tools \ vsvars32.bat registered vs Environment Variables
- The nmake.exe directory where the C: \ Program Files (x86) \ Microsoft Visual Studio 14.0 \ VC \ bin join PATH environment variable
- When you need to install Qt install src to find configure.bat , after opening the VS2015 x86 native tools command prompt , execute the following command, the last folder path for the path where Qt installed :( C: \ Qt \ Qt5.9.0 \ 5.9 \ src \ qtbase \ configure.bat -top-Level License -platform -opensource -confirm-win32-MSVC -debug-and-Release-opengl the -no-the compile-Dynamic Tests examples -nomake the --skip qtwebengine -mp -prefix C: \ qt \ Qt5.9.0 \ 5.9 \ msvc2015 ) Note that the command line is in brackets
After opening pro file from the Qt Vs Tools can be converted into a VS project.
3) can not run "rc.exe"
Solution: https://blog.csdn.net/wb175208/article/details/83546814
Installed on the computer programming before bad environment:
VS2013 + Qt5.7.0
reinstall a programming environment:
VS2015 + Qt5.10.0
After installation, set up a simple Qt project, compile time error:
LINK: fatal error LNK1158: can not run "rc.exe"
solution:
search before a rc.exe and redll.dll under the same platform
Then these two files to:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
In this compilation on the adoption!
4) I could not find some of the other include files and library files
Solution: Search the folder that contains the file and the folder where the library, then put this into the path environment variable INCLUDE (not the new) at the lower and LIBS.