December 23, 2012

Dreeass Dreeass
Lab Rat
8 posts

:-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.

Page  
1

That is the error when I’m trying to compile my project and when going to Qt Versions in the options menu, it says that no compiler can produce code for this Qt version. Please define one or more compilers when I have 6 compilers in the compilers tab.

35 replies

December 23, 2012

Tobias Hunger Tobias Hunger
Area 51 Engineer
3383 posts

The interesting question is: Is any of those compilers compatible with the Qt version you want to use?

E.g. if you have a Qt build with MSVC2010, then having MSVC2008 and 100 different instances of mingw installed will not do you any good: Those will produce binaries that will fail when linked to your Qt libraries.

December 23, 2012

Dreeass Dreeass
Lab Rat
8 posts

Tobias Hunger wrote:
The interesting question is: Is any of those compilers compatible with the Qt version you want to use?

E.g. if you have a Qt build with MSVC2010, then having MSVC2008 and 100 different instances of mingw installed will not do you any good: Those will produce binaries that will fail when linked to your Qt libraries.


Well you’re just telling me the exact same Qt is telling me, I’m asking for a fix. And excuse me for my bad attitude, I’m just having a bad day.

December 23, 2012

Tobias Hunger Tobias Hunger
Area 51 Engineer
3383 posts

Well, you’re not providing the information necessary to be more specific. Without any information but the error message all we can do here is repeat that to you:-)

Which compilers do you have? (Tools>Options>Build & Run>Compilers) Which Qt version? (Tools>Options>Build & Run>Qt versions, check the details there after clicking on one version). Which kit do you want to use and how is that configured.

December 23, 2012

Dreeass Dreeass
Lab Rat
8 posts

Tobias Hunger wrote:
Well, you’re not providing the information necessary to be more specific. Without any information but the error message all we can do here is repeat that to you:-)

Which compilers do you have? (Tools>Options>Build & Run>Compilers) Which Qt version? (Tools>Options>Build & Run>Qt versions, check the details there after clicking on one version). Which kit do you want to use and how is that configured.


Version name: Qt 5.0.0 MSVC2010 32bit (SDK)
Screenshot of compilers: http://i.imgur.com/WtWeh.png
I’m also getting an error in Visual Studio 2012 Ultimate when trying to create a Qt app:
First when clicking the first next > button in the Project wizard: http://i.imgur.com/5cZDM.png and when clicking finish it just takes me back to a new project.

December 23, 2012

Dreeass Dreeass
Lab Rat
8 posts

December 23, 2012

JKSH JKSH
Area 51 Engineer
2283 posts

You have MSVC 2012 installed. It cannot produce code for your version of Qt 5, which requires MSVC 2010. Those two compilers are incompatible.

Install MSVC 2010, and (most of?) your troubles should disappear.

December 23, 2012

Dreeass Dreeass
Lab Rat
8 posts

JKSH wrote:
You have MSVC 2012 installed. It cannot produce code for your version of Qt 5, which requires MSVC 2010. Those two compilers are incompatible.

Install MSVC 2010, and (most of?) your troubles should disappear.


Do you mean that I need another IDE, I don’t understand much about the programs I need and stuff. Can you send me a link where to download it?

December 24, 2012

JKSH JKSH
Area 51 Engineer
2283 posts

No need to download another IDE :)

Visual Studio is Microsoft’s IDE, which includes the Visual C++ compiler. However, if you don’t want the full IDE, you can just get the Windows SDK 7.1 (http://www.microsoft.com/en-us/download/details.aspx?id=8279 ), which also contains the Visual C++ 2010 compiler.

After that, read this to “link” your new compiler with your chosen version of the Qt library: http://doc-snapshot.qt-project.org/qtcreator-2.6/creator-targets.html

The following should already be done for you automatically, but just in case, here are the instructions:
http://doc-snapshot.qt-project.org/qtcreator-2.6/creator-tool-chains.html
http://doc-snapshot.qt-project.org/qtcreator-2.6/creator-project-qmake.html

December 24, 2012

Dreeass Dreeass
Lab Rat
8 posts

JKSH wrote:
No need to download another IDE :)

Visual Studio is Microsoft’s IDE, which includes the Visual C++ compiler. However, if you don’t want the full IDE, you can just get the Windows SDK 7.1 (http://www.microsoft.com/en-us/download/details.aspx?id=8279 ), which also contains the Visual C++ 2010 compiler.

After that, read this to “link” your new compiler with your chosen version of the Qt library: http://doc-snapshot.qt-project.org/qtcreator-2.6/creator-targets.html

The following should already be done for you automatically, but just in case, here are the instructions:
http://doc-snapshot.qt-project.org/qtcreator-2.6/creator-tool-chains.html
http://doc-snapshot.qt-project.org/qtcreator-2.6/creator-project-qmake.html


What do I have to do to make the add-in work? (Error screenshot is in a previous message)

December 24, 2012

JKSH JKSH
Area 51 Engineer
2283 posts

Dreeass wrote:
What do I have to do to make the add-in work? (Error screenshot is in a previous message)
Which add-in are you referring to? What do you want to use it for? I don’t understand the language in the screenshot, sorry.

If you are talking about the Visual Studio Add-in, then the answer is: That add-in is not for Qt Creator. It is for people who want to write Qt programs using the Visual Studio IDE.

December 24, 2012

Dreeass Dreeass
Lab Rat
8 posts

JKSH wrote:
Dreeass wrote:
What do I have to do to make the add-in work? (Error screenshot is in a previous message)
Which add-in are you referring to? What do you want to use it for? I don’t understand the language in the screenshot, sorry.

If you are talking about the Visual Studio Add-in, then the answer is: That add-in is not for Qt Creator. It is for people who want to write Qt programs using the Visual Studio IDE.


This is the output I’m getting when trying to build my test project:
  1. 14:41:32: Running steps for project Tutorial...
  2. 14:41:32: Configuration unchanged, skipping qmake step.
  3. 14:41:32: Starting: "C:\Qt\Qt5.0.0\Tools\QtCreator\bin\jom.exe"
  4.  C:\Qt\Qt5.0.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
  5.  cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"..\..\..\..\5.0.0\msvc2010\include" -I"..\..\..\..\5.0.0\msvc2010\include\QtWidgets" -I"..\..\..\..\5.0.0\msvc2010\include\QtGui" -I"..\..\..\..\5.0.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"..\..\..\..\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\Users\Andreas\AppData\Local\Temp\main.obj.6316.0.jom
  6. 'cl' is not recognized as an internal or external command,
  7. operable program or batch file.
  8. jom: C:\Qt\Qt5.0.0\Tools\QtCreator\bin\Tutorial-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug\Makefile.Debug [debug\main.obj] Error 1
  9.  cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"..\..\..\..\5.0.0\msvc2010\include" -I"..\..\..\..\5.0.0\msvc2010\include\QtWidgets" -I"..\..\..\..\5.0.0\msvc2010\include\QtGui" -I"..\..\..\..\5.0.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"..\..\..\..\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\Users\Andreas\AppData\Local\Temp\mainwindow.obj.6316.16.jom
  10. 'cl' is not recognized as an internal or external command,
  11. operable program or batch file.
  12.  cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"..\..\..\..\5.0.0\msvc2010\include" -I"..\..\..\..\5.0.0\msvc2010\include\QtWidgets" -I"..\..\..\..\5.0.0\msvc2010\include\QtGui" -I"..\..\..\..\5.0.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"..\..\..\..\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\Users\Andreas\AppData\Local\Temp\moc_mainwindow.obj.6316.16.jom
  13. 'cl' is not recognized as an internal or external command,
  14. operable program or batch file.
  15. jom: C:\Qt\Qt5.0.0\Tools\QtCreator\bin\Tutorial-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug\Makefile.Debug [debug\mainwindow.obj] Error 1

main.cpp

  1. #include "mainwindow.h"
  2. #include <QApplication>
  3. #include <QHBoxLayout>
  4. #include <QSlider>
  5. #include <QSlider>
  6. #include <QSpinBox>
  7.  
  8. int main(int argc, char *argv[]) {
  9.     QApplication prog(argc, argv);
  10.  
  11.        QWidget *mainWindow = new QWidget;
  12.        mainWindow->setWindowTitle("How many chicken wings?");
  13.  
  14.        QSpinBox *spinner = new QSpinBox;
  15.        QSlider *slider = new QSlider(Qt::Horizontal);
  16.        spinner->setRange(1,50);
  17.        slider->setRange(1,50);
  18.        QObject::connect(spinner, SIGNAL(valueChanged(int)),
  19.                         slider, SLOT(setValue(int)));
  20.        QObject::connect(slider, SIGNAL(valueChanged(int)),
  21.                         spinner, SLOT(setValue(int)));
  22.        spinner->setValue(10);
  23.  
  24.        QHBoxLayout *layout = new QHBoxLayout;
  25.        layout->addWidget(slider);
  26.        layout->addWidget(spinner);
  27.        mainWindow->setLayout(layout);
  28.        mainWindow->show();
  29.  
  30.     return prog.exec();
  31. }

Kits: http://i.imgur.com/vRHy7.png
Compilers: http://i.imgur.com/cBZaQ.png

December 25, 2012

sNicky sNicky
Lab Rat
3 posts

on Ubuntu 12.10 Qt 5.0.0 i just did:
1. sudo apt-get install g++
2. restarted computer(don’t know if need it)
and appeared another problem:(error: cannot find -lGL qt)
3. sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
4. all goes normal :)

December 25, 2012

JKSH JKSH
Area 51 Engineer
2283 posts
Dreeass wrote:
  1. 'cl' is not recognized as an internal or external command,
  2. operable program or batch file.

Did you restart your computer after installing the SDK, and before compiling your program? Windows 7 (and earlier) requires a restart after registering new environment variables.

If that doesn’t help, try http://stackoverflow.com/questions/8800361/cl-is-not-recognized-as-an-internal-or-external-command

December 25, 2012

Dreeass Dreeass
Lab Rat
8 posts
JKSH wrote:
Dreeass wrote:
  1. 'cl' is not recognized as an internal or external command,
  2. operable program or batch file.

Did you restart your computer after installing the SDK, and before compiling your program? Windows 7 (and earlier) requires a restart after registering new environment variables.

If that doesn’t help, try http://stackoverflow.com/questions/8800361/cl-is-not-recognized-as-an-internal-or-external-command


I’m running Windows 8 64-bit, could you please explain it yourself on how I do it because I’m getting sick of the hundreds of Microsoft sucky help pages. I have literally tried every single thing, WxWidgets seems to be better for me.

December 26, 2012

JKSH JKSH
Area 51 Engineer
2283 posts

I just looked at your compilers+kits screenshot again, and realized that you’re using Visual Studio 2010, not just Windows SDK 7.1.

If I remember correctly, you’ll still need to install Windows SDK 7.1, AND upgrade Visual Studio 2010. However, the installation order is important, because of a bug in Microsoft’s patches [blogs.msdn.com]. The correct order is:

  1. Install Visual Studio 2010 (which you’ve already done)
  2. Install Windows SDK 7.1 [microsoft.com]
  3. Install Visual Studio 2010 SP1 [microsoft.com]
  4. Install Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1 [microsoft.com]

Note: If you’ve already done step #3 without doing step #2, you should uninstall Visual Studio 2010 and start again.

Page  
1

  ‹‹ How to know end of page?      Internet connection with QUdpSocket ››

You must log in to post a reply. Not a member yet? Register here!