No success trying to build Windows apps using Qt 5
-
Hello, I am just trying to build Windows apps using Qt 5.2.1 (MSVC 2010, 32 bit), with Qt Creator 3.0.1. I don't know why it has to be so difficult. After I installed Qt, I had the error "Qt Creator needs a compiler set up to build. Configure a compiler in the kit options." I had "Microsoft Visual C++ Compiler 12.0 (x86)" listed but it did not satisfy this requirement apparently. After a few hours of toil and trouble, I got MinGW installed (don't know what version) and added it to my compilers list. I added MinGW to my kit and still the same error message.
Any idea what the problem is? I am running Windows 7 Enterprise 64-bit.
I don't want to be obnoxious, but I don't understand why there are not instructions somewhere (somewhere searchable on google or prominently located at qt-project.org) with the entire process to build Windows apps with Qt. It has to be a very common thing.
MinGW Compiler settings:
Name: MinGW (x86 32bit in C:\MinGW\bin)
Compiler path: C:\MinGW\bin\g++.exe
Platform codegen flags: <blank>
Platform linker flags: <blank>Kit settings:
Name: Unnamed
Device type: Desktop
Device: Local PC (default for Desktop)
Sysroot: <blank>
Compiler: MinGW (x86 32bit in C:\MinGW\bin)
Debugger: None
Qt version: Qt 5.2.1 MSVC2012 OpenGL 64bit
Qt mkspec: <blank>Thanks a lot
Ron (Oklahoma, USA) -
You downloaded the Qt 5.2.1 MSVC2012 OpenGL 64bit. That will NOT work with MinGW which is different compiler. You need to obtain MSVC2012.
-
Hi and welcome to devnet,
When developing on Windows you cannot mix everything and anything. The Qt used must match the compiler used. You have download the VS2010 package but you have VS2013. You must use a matching build of Qt. Currently the Qt project proposes VS2013 package only for Qt 5.3 beta but you can also find some "here":http://www.tver-soft.org/qt64
Qt doesn't bundle any compiler except for the MinGW package where all is provided so there's no need for any additional installation. Visual Studio can only be acquired (even the free edition) from Microsoft.
-
Thank you for the quick answers. So if I install instead "Qt 5.2.1 for Windows 32-bit (MinGW 4.8, OpenGL, 634 MB)" will that work for me even though I am running Windows 7 64-bit?
Ron -
Yes, Windows 7 64bit can run both type of binaries
But first thing to do is uninstall the MinGW you already installed since you don't need it that will avoid potential conflicts
-
Hi, yes it will work!
-
I will install that one. Does any Qt work with Visual Studio Express?
Thanks -
Yes it does work with the express edition
-
Thank you for the replies. I installed "“Qt 5.2.1 for Windows 32-bit (MinGW 4.8, OpenGL, 634 MB)”, then set the compiler to "MinGW 4.8 32bit" and was immediately able to build. I have been adding some controls and playing around, and my app crashed a couple times, and Qt crashed a couple of times, so seems it's not real stable.
Ron -
Did you remove the other MinGW ?
-
MinGW is a compiler, just as Visual Studio.
Windows 7 64-bit is an operating system. -
Your combination of "Win7 64-Bit + Qt 5.2.1 for Windows 32-bit (MinGW 4.8, OpenGL, 634 MB)" should work stable - do you have any error messages?