Visual-studio – How to set up Qt paths in Visual Studio 2010

qtqt-creatorvisual studiovisual studio 2010

I just downloaded and installed the latest versions of the Qt SDK, Qt Creator, and the Qt add-in for Visual Studio (I'm running VS 2010).

First, I tried creating a Qt project in VS2010. It came up with

Unable to find a Qt build!

To solve this problem specify a Qt build

So I go to the Qt -> Qt Options menu item in VS and click Add for the version.

Now, I have 2 qmake.exe files: one in C:\Qt\2010.05\qt\qmake and one in C:\Qt\2010.05\qt\bin

For some reason, if I select either one of these files, it comes up with the error message the this version of Qt was built with MingW. (I don't see why it makes a difference what compiled it, just so long as it's compiled?)

After spending some time trying to find a working qmake.exe for the VS add-in I gave up and tried to get the original Qt creator to work instead.

Qt creator is also not configured to run with itself (lol).
When I select the path to either of my 2 qmake.exe files, it comes up with an error message when I try to compile a small program:

Could not find make command: make in the build environment

Error while building project untitled (target: Desktop)

When executing build step 'Make'

When I check the options in Qt creator, it says qmake is at version 4.7.0 and that

Qt version is not properly installed, please run make install

The VS2010 add-in is installed to my program files (x86) folder, but there are no qmake.exe files there.

I'm running Windows 7 x64.

Best Answer

I'm almost positive that you have to rebuild the Qt libraries in Visual Studio first before you can use them. That probably explains why you're getting the error message that a Qt build can't be found, and that the version of Qt you're using was built with MinGW.

I suggest reading this blog post for what looks to be a solid how-to guide on integrating Qt with VS.

This looks like an even simpler guide, although it's in PDF format: Qt Installation for Visual Studio