Qt Creator configure vs2010 compiler and debugger

(This article is original, please indicate that it is from johnsmith9th.iteye.com)


Qt Creator is just an IDE, it does not have a compiler and debugger itself. So if you use QtCreator to develop, you need to configure it with an external compiler and debugger. This problem basically does not exist on the linux platform, because the gcc compiler and gdb debugger are provided by default in the operating system; on the Windows platform, configuring the compiler and debugger for it is a very tricky thing. Under the current Windows platform, the VS2010 compiler is king. The Ming GW compiler has many limitations. For example, if you want to use Oracle's C++ to access, sorry, Oracle does not provide the occi library compiled by the Ming GW compiler. Well, then choose VS2010, but if I have the IDE of VS2010, do I still need Qt Creator? For developers who choose Qt Creator under Windows, I think there are four reasons: 1. Can't afford Visual Studio 2. Don't want to pirate Visual Studio 3. The computer is too broken to run Visual Studio 4. Develop mobile applications. Well, I admit that I fall into the third situation. Of course, it is also feasible to install VS express. I use the method of installing Window SDK 7.1. I'm sorry, even if it is VS express, my books can't bear such a heavy load. Besides, the download volume of VS express is 1.7GB. Do you like it with endless forms to fill out?

Let's get down to business:
first go to http://www.qt.io/download-open-source/#section-3 to download the VS2010 32bit compiled version of Qt 5.3.2. The installation method recommended on this page is online installation, save it. This recommendation does not apply to China's national conditions. If you don't believe it, try it. Selecting Qt 5.3 in the navigation bar in the middle of the page is your correct choice. After downloading and installing, you have the Qt development environment. At this point, if you open Qt Creator to write a hello world, you will find that it cannot be compiled.

Next go to http://www.microsoft.com/en-us/download/confirmation.aspx?id=8279 to download Windows SDK 7.1, the only version that works. If you downloaded the Windows SDK 8.0 and above, then wait and cry, subsequent versions of the Windows SDK will no longer release free compilers. The download and installation of Windows SDK is very unstable. You think the installation is complete, but in fact, the options you checked are not installed successfully at all (Microsoft is in decline...), after installation, you need to go to the control panel and select WindowSDK7.1 , and then use the change option to check whether the option you checked is really installed successfully, at least make sure that the Compiler and Debug Tools are installed successfully. In my case, I changed and installed WindowSDK7.1 three times before downloading and installing the components I needed.
Go to the build and run items in the options dialog of the Qt Creator tool menu, and check the auto-configuration entry on the build kit (kit) page, and find that the compiler and debugger are automatically detected. At this point, you compile your hello world with joy, then congratulations, you have encountered a big pit: LINK1123 failure during conversion to COFF: file invalid or corrupt.

We can't stay away from this problem, here's the final blow:
go to http://www.microsoft.com/en-au/download/details.aspx?id=4422 to download VC2010 SP1, after installing this patch, Our problem is settled. Enjoy your Qt Creator compilation and debugging journey.

Of course, there is also an episode, that is, you will encounter errors such as intrin.h(26) : fatal error C1083: Cannot open include file: 'ammintrin.h': No such file or directory, if you go to the Internet to search for a Search, that's all to persuade you to install Visual Studio, and then install a patch for kb983509------ this is just Microsoft's ecstasy, the method I use is very simple---- to C:\ Program Files\Microsoft Visual Studio 10.0\VC\include Create an empty file ammintrin.h Ok------don't tell me you are using an Amd CPU

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326446070&siteId=291194637