VS2017 + QT5.12 environment configuration

Recently the need to recompile a DLL dynamic link library, because the source code contains the QT code, so now we need to configure VS + QT environment.

I system environment: Win10 64 Wei

First, install

Visual Studio 2017 software download installation tutorial: https://mp.weixin.qq.com/s/oOAxsbAEBigxvp356yINQQ

QT5.12 download path: http://download.qt.io/archive/qt/

Note: QT5.12 mingw inside the 64-bit, 32-bit is no longer a. In order to be loaded VS QT, QT addition to the installation when installing MinGW 64bit, also you need to install MSVC 64bit.

Specific installation method can refer to the tutorial blogger, quite detailed: https://blog.csdn.net/gaojixu/article/details/82185694

Second, some notes

1. If only develop in MSVC version of QT inside, we need to make some additional settings in Qt Creater, as follows:

Select Qt Creater in Tools -> Options , select Kits in the build kit (Kit) option, the debugger installation path is configured, as shown below :( This is what I've configured)

 In general, as long as the installation of VS2017, in Qt build kit option, the associated compiler, debugger will automatically recognize.

If the debugger is not (is cdb.exe this document does not), probably in the install VS2017 when not check what win10 SDK, where you can go to the official website to download the reference address: https://docs.microsoft.com/zh-cn / windows-hardware / drivers / debugger / debugger-download-tools

Go to web address, click on the following location:

Click to download the installer, you can then download and install

2. If you want to develop in VS QT inside, you need to pay attention to the following questions:

(1) After generating a dynamic link library with vs, introduced inside the python error appears as follows - OSError: [WinError 127] can not find the specified program:

Or the command line to run, reported the following errors: - The procedure entry point could not be located in the dynamic link library *** ***

The reason: each person's reason, but it is definitely a problem because the generated DLL, resulting in python can not load the dll.

The reason why this error I am here because I own the system variable path QT is wrong, resulting in generation of Dll problems. Because I was inside the system mingw version of QT and QT msvc version, the default settings of the path of the former mingw version of QT, so the emergence of this issue. QT path order in question as follows:

Before the normal path should be placed msvc mingw, a first time so as to ensure the system can find the matching QT msvc, as follows:

 

Guess you like

Origin www.cnblogs.com/FHC1994/p/11419095.html