Important: Please read the Qt Code of Conduct -

Qt5 Visual Studio 2012 Add-In - Doesn't recongize Qt5

  • Hello,

    I have installed the Vs2012 Add-in but I am unable to specify the Qt framework.

    @Qt5 -> Qt Options -> Qt Versions -> add@

    I am unable to choose the qmake.exe. I am only able to select the bin folder like this


    even if I try to add @D:\Qt\Qt5.0.0-rc2\5.0.0-rc2\msvc2010\bin\qmake.exe@ the Ok button is still grey.
    Maybe I have to compile the Qt5 source with Visual c++ 2012 compiler to make it work?

  • Try like this:


    The add in adds \bin automatically, so you need to point to the root of the build

  • Oh okay thank you, now I fell a little bit stupid.
    Anyways now visual studio doesn't find the header files, I think I try a clean up to date source compilation.


    I just added the includes manually, which seems to work but then I get the following error msg
    @error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in moc_test1.obj@

    Which is probably because this version of Qt is compiled with vs2010

  • Well, obviously, you need to have Qt compiled with MSVC2012 compiler to compile projects with it. Or get MSVC2012...

    You should also know that VS2012 compilation is likely to produce wrongly named lib files, putting an extra 5 after the name of each file, renaming the files to remove the trailing 5 fixes that.

    As for the headers, there has been some rearranging, make sure the include folder of Qt5 is into the project properties - C++ - general - additional include directories, the add on should add those, but if not, you should add manually. Id you still get an error trying to locate some headers, go and search for them in the include folder to see if they aren't moved to some sub-folder.

Log in to reply