Environment installation
Requirements download
Installation order
- Install Qt 5.7 dynamic compiler
- Install Visual Studio 2015
- Install Qt VS AddIn
- Install MinGW
- Install Visual Studio Code
Environment configuration
Dependencies
- Open the project with VS2015, right click
Project - Properties
- Configure the selection
Release
- Open
Configuration Properties - C/C++ - Code Generation - Runtime Library and select Multithreading (/MT)
- Open
Configuration Properties - Linker - Input - Additional Dependencies and paste in the following long string of characters:
$(QTDIR)\lib\qtmain.lib;$(QTDIR)\lib\Qt5Widgets.lib;$(QTDIR)\plugins\platforms\qwindows.lib;winspool.lib;shlwapi.lib;rpcrt4.lib;$(QTDIR)\lib\Qt5PlatformSupport.lib;$(QTDIR)\plugins\imageformats\qdds.lib;$(QTDIR)\plugins\imageformats\qicns.lib;$(QTDIR)\plugins\imageformats\qico.lib;$(QTDIR)\plugins\imageformats\qtga.lib;$(QTDIR)\plugins\imageformats\qtiff.lib;$(QTDIR)\plugins\imageformats\qwbmp.lib;$(QTDIR)\plugins\imageformats\qwebp.lib;$(QTDIR)\lib\Qt5Gui.lib;comdlg32.lib;oleaut32.lib;imm32.lib;winmm.lib;glu32.lib;opengl32.lib;gdi32.lib;$(QTDIR)\lib\qtharfbuzzng.lib;$(QTDIR)\lib\Qt5Core.lib;kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;mpr.lib
Qt configuration
- Complete the additional dependencies configuration from the previous step
- Unzip the compiled Qt static compiler
qt5-x86-static-release
- Open the project with VS2015, click
[Qt VS Tools] -> [Qt Options] -> [Add], select the Qt static compiler path unzipped just now and confirm
- Select
qt5-x86-static-release in the [Default Qt/Win version] drop-down menu, click OK
Debug
- Right-click the project directory and open the project with VSCode
- Confirm that the
includePath of c_cpp_properties.json in the project is correctly configured with the Qt 5.7 dynamic compiler path installed earlier, and the compilerPath is correctly configured with the environment variable path of MinGW
- Click
Run - Start Debug (or press F5 directly on the keyboard to start Debug mode)
Release
- Open the project with VS2015
- Select
Release mode x86
- Select
Build - Rebuild Solution
- Take out the .exe file from Release in the project directory, which is the file for release