Missing compiler in Qt Creator - c++

I recently installed Qt creator 2.8.1 online on my win Vista 32 bit machine.
To start with Qt I wrote simple pushbutton code. And when I tried to build it shows error message saying
Qt Creator needs compiler set up to build. Configure a compiler in kit
option
I tried with that Kit option din't work. what do I do?
PS Thank You

Simply refer to MINGW online install available at Qt's official downloads( http://download.qt-project.org/). You need not do anything. It will automatically detect an kits and will compile successfully.

Related

Qmake on Windows

I have a project written in Qt that I have no problems compiling and running on Linux. The command line is:
qmake ../trunk/GSDTesting.pro
The process on Linux was really simple: install a few dependencies using apt and you are off.
My task is to recompile the same program on Windows using Visual Studio C++ compiler, but the problem is I don't know how to start. There is no such thing as qmake for Windows.
Can someone give me a few hints where to start. Please note that I don't know QT almost at all, my task is just to debug some issue unrelated to QT.
Are you using terminal exclusively on Windows? If so, maybe this image of example build steps straight from Qt Creater 4.14.2 may help you:
As you can see the image of the default Qt creator build steps list the file path where 'qmake.exe' can be located on a local installation of the toolchain.
If you can use a machine with a display I find using the Qt creator GUI is not all that bad.
Here is a link to the base get started page:
https://doc.qt.io/qt-5/gettingstarted.html
Here is a link to the installer download page:
https://www.qt.io/download
IMPORTANT:
You will need to make a Qt account, login to your account, and then download the open-source version of the API. The commercial version of the same source is acquired differently/seperately.
Otherwise, if you cannot use the GUI, can I request some clarification on why you cannot use Qt creator on your Windows installation?

cannot compile any application in Qt5 on Windows7

I have installed Qt Creator 4.0.1 (based on Qt 5.6.1) on Windows 7 (64 bit), it finds two kits (Desktop Qt 5.6.1 MCVS2013 64bit2 and Desktop Qt 5.7.0 MCVS2013 64bit), both have two debuggers to choose (MinGW or Debugging tools for windows). So everything seems to be OK, but whenever I press Run for any simple application from examples, the Build indicator goes red, and then disappears, and the exe-file is not created, but IDE does not give any explanation to the reason why.
I'm new to Qt and really want to find out what I am doing wrong and get started with it. The error output is as follows:
Cannot find file: D:\рабочее\БГУИР\qt\first\myfirst\myfirst.pro.
12:30:54: The process "C:\Qt\5.7\msvc2013_64\bin\qmake.exe" exited with code 2.
Error while building/deploying project myfirst (kit: Desktop Qt 5.7.0 MSVC2013 64bit)
When executing step "qmake"
Maybe the Cyrillic charset causes the problem?
There has to be an output of some kind somewhere. If not under the debug tab "issues", then perhaps "Compile output".
I know that on Linux if you are running a QT example, you have to make sure you have made a copy of the code instead of running it in place. Otherwise, Qt will try to create a build folder under /opt and fail due to permission. You could also specify such a build folder when you configure the project. I am not sure whether on Windows it is going to be an issue, but it's a good place to check.
Hope this helps.

Adding MinGW compiler to QT 5.6.0 Windows

I am a Total Noob at this and I know nearly nothing about this.
I just started using Qt Creator for windows 5.6.0 and While I wrote my first "Hello World" code..
I was asked to add a kit. I searched the net for similar issues and it said that I needed a compiler for Qt. Thus, I installed MinGW from QtForums
now when go to Tools->Options->Build&Run->compiler, I can not understand how do I add it to the list.
Please help me through it?
To just get started the easiest thing to do would be to go here:
Link to Qt downloads page
Scroll down and select Qt 5.6.0 for Windows 32-bit (MinGW 4.9.2, 1.0 GB) this will download the installer (its about 1 GB). Run it and choose all the default options. Then you will have Qt 5.6 with mingw and Qt Creator all setup ready to go.
Note: Before you start that its probably best to delete your current version - if you are not attached to it in any way :)
If you want to fix your current setup, then it might be longer-winded to find out what you are missing for mingw. For example you need the mingw qmake file that would be located here (using default install options):
C:\Qt\Qt5.5.1\5.5\mingw492_32\bin\qmake.exe
to create your "Qt Version" part of the kit. And the actual mingw compiler, which is located here (using default install options):
C:\Qt\Qt5.5.1\Tools\mingw492_32\bin\g++.exe
to create your compiler. Once you have both of these then you can put them together to create your new kit.
But to just add a compiler all you need to do is:
Click compilers tab
Click add and select mingw
A new compiler is added, click it
You will see some options below, add your compiler executable path in (like the one above for example).
And you are done - there are some other options, but you probably don't need to use them.
note my paths are for qt 5.5.1 (obviously) so slightly different to 5.6 :)
update
Its all been moved around! - here are the new paths:
offline-installers
old-version-archives
Well. I was unable to provide the data before but it all makes more sense now.
What I had installed was Qt for windows 64-bit (vs 2013, 836mb).
Hence, Instead of MinGW, I have msvc2013_64. It does have qmake.exe but doesnt have g++.exe. And I had downloaded it separately.
You're answer was very helpful.
Added MinGW packages to QT installation with the QT Maintenance Tool (C:\Qt\MaintenanceTool.exe)
It allows to add/remove components via the qt repositories. So no need for re-installation.

Qt Creator needs a compiler set up to build

So i downloaded Qt and am designing my first GUI, and now it wont compile, i keep getting an error that says:
Qt Creator needs a compiler set up to build
I've searched around on the net but alot of it seems jargon, even the other Stack Overflow documents dont make any sense..
How do i set up a compiler for QT to use? I downloaded g++ compiler last night to use with Sublime Text 2, and that's working, so is there a way to make g++ work with Qt?
Thanks guys
(I supposed you're using Windows )
If you downloaded Qt for Visual studio you need to install visual studio too. Then go to
Tools -> Options -> Build & Run
in Qt Creator and then, in Compilers tab add new compiler.

QtCreator: process jom.exe exited with code 3

I had a working C++/Qt application. I updated MinGW, Qt and Qt Creator to the latest versions, and now I get an error at compile time. This error does not seem to be due to my code, but to the build system.
E.g.:
17:11:15: Running steps for project MyTest...
17:11:15: Starting: "C:\Qt\qtcreator-2.6.0\bin\jom.exe" clean
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
17:11:20: The process "C:\Qt\qtcreator-2.6.0\bin\jom.exe" exited with code 3.
In the project settings there is the message "qmake: No Qt version set. Cannot run qmake."
My source code is just what you get automatically when you create a new application.
I updated the system environment path with the new Qt and QtCreator directories.
I do not know what else to do...
Thank you!
---
Windows 7
MinGW
Qt 4.8.4
Qt Creator 2.6.0 (based on Qt 4.8.3 32 bit)
Please go to Tools->Options->Build & Run->Kits and check that there is a Qt version set up in the kit you are using.
If not, then check the Qt versions creator detected in Tools->Options->Build & Run->Qt versions. Is the version you want to use there? If not: Add it here.
Then return to the kits page and set one of the kits to use that version. Double check the other information while there.
Now you should be able to build your project. You might need to close/reopen it though.
Initial setup seems to be a bit bumpy... but it works really well once you get over that initial hurdle:-( There are quite some improvements in the next update for this. Check the Qt 5 RC2 packages, the creator included there already contain most of the fixes if you are curious).