8

Possible Duplicate:
VC++ compiler for Qt Creator
QT5 beta2, QT creator 2.6, MSVC error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options

I just installed Qt Creator ( my first expcerience with it ) and I'm getting this error, when I try to compile:

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

It's indeed very suggesting, and I read on other post here on stack, but I just couldn't get it done. These are my options from Build&Run -> Compilers:enter image description here

Details:

  1. It's Qt Creator 2.6.1 Based on Qt 5.0.0 (32 bit)
  2. I've installed visual studio 2012
  3. On the Qt download page , for Windows, there was only 32 bit option, but I have Windows 7 64bit

LE: These are Kits options enter image description here

What paths must be specified for Sysroot and Qt mkspec?

Community
  • 1
  • 1
Jack Willson
  • 2,094
  • 6
  • 21
  • 23

1 Answers1

3

you are using Visual Studio 2012, The solutions:

1) remove it and reinstall Visual Studio 2010, Qt 5.0 works with this version of microsoft C/C++ compiler.

2) install mentioned SDK compiler direclty from microsft's website.

Reza Ebrahimi
  • 3,623
  • 2
  • 27
  • 41
  • I went for 2) and i think i getting closer. In the versions tab it has detected the version correctly ( QT 5.0.0MSVC2010 32 bit SDK c:\.....\qmake.exe), it has detected microsoft visual c++ compiler 9(many variants), microsoft visual c++ compiler 11(many variants) and Microsoft Windows SDK fow Windows 7(many variants). Now it compilers but i try to run it i get this:Starting C:\Apps\app1-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug\debug\app1.exe... The program has unexpectedly finished. C:\Apps\app1-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug\debug\app1.exe exited with code -1073741515 – Jack Willson Jan 23 '13 at 19:48
  • this is a mismatch in installed microsft library on your system, an incomplete installation of libraries will affects your programs, sometimes a signature mismatch in a .dll file make fault on system, download the SDK from microsoft website and it will be automatically installed on your system, if it fails to work, do first step and there will go Jack, good luck. – Reza Ebrahimi Jan 23 '13 at 20:01
  • 1
    and about your kit, Qt 5.0 only works with msvc 2010 because of their qmake process done with msvc 2010 compiler and is not a point on your system, you must install the correct version of compiler. – Reza Ebrahimi Jan 23 '13 at 20:05
  • So, should i install visual c++ 2010 express to get the job done? – Jack Willson Jan 23 '13 at 20:24
  • I did it and it works. I really appreciate that you guided me. Thank you very much. – Jack Willson Jan 23 '13 at 21:41
  • be happy and you are welcome to Qt world Jack! Qt is a great framework you faced with it, enjoy and then enjoy! – Reza Ebrahimi Jan 23 '13 at 21:53
  • @JackWillson Hello. I have the same problem as you. I installed SDK and now I'm getting that error (The program has unexpectedly finished). How did you fixed it? – Hooch Mar 20 '13 at 18:00
  • @Hooch: create a simple console project in Qt and compile it, if it get failed, may you have had a failure in your kits or anywhere, you must give some extra info about your kit, compiler and your code. – Reza Ebrahimi Mar 20 '13 at 20:34
  • @Reza It all compiles without error. But it fails at running. I selected the compiler that I installed with Windows 7 SDK because I know that the one from VS 2012 is not working. After changing to that compiler from SDK it compiles but fails at starting. – Hooch Mar 20 '13 at 20:46
  • @Hooch: your error seems that like a variable reference error or reach code error, you should give me detailed info about your code. – Reza Ebrahimi Mar 20 '13 at 21:16
  • @Reza It is simple form with one button and no custom code at all. I also tried example from tutorial page (the one that searches string in text). http://i.imgur.com/Lpsx7C3.png and http://i.imgur.com/TBcRV1w.png – Hooch Mar 20 '13 at 21:26
  • @Hooch: I see your pics, A mismatch in library signatures occured in your system, because the combination of VS2012 and Windows SDK 7 compilers (MSVC 11.0 and MSVC 10.0) makes failure because of its mismatch in library loading, my suggestion is remove VS2012 and try again, if problem not resolved, you must uninstall SDK and install only VS 2010. – Reza Ebrahimi Mar 21 '13 at 20:28
  • @Reza I don't think so. I selected the proper compiler for my "Kit". Look at this video: http://youtu.be/fngwe6dozZo It would be great if someone could help me to fix it. – Hooch Mar 21 '13 at 21:49
  • @Hooch: yes, you are right, but if there are two .dll file with same name (ex. A.dll, first one for MSVC 10 and second for MSVC 11) and only difference between them is their signature(Dates and ...), compiler does not know to use which of them, this is not Runtime library problem, if you solves that I'm be glad to hear its reason, Thanks. – Reza Ebrahimi Mar 21 '13 at 22:06
  • @Reza Is there any way of solving that without uninstalling vs2012? I use it for work. – Hooch Mar 21 '13 at 22:40
  • 1
    @Hooch: yes, use MinGW version of Qt, first download and install MinGW then add its path to your system path (System Variables), second download MinGW version of Qt and install them, after that Qt automatically detects g++ as its compiler, add g++ to your kit (if Qt Creator does not detect it by default). – Reza Ebrahimi Mar 21 '13 at 23:07
  • @Hooch: Dear Hooch as I see you are from Poland, I want to have a talk about Poland's software industry with you if possible, thanks. – Reza Ebrahimi Mar 21 '13 at 23:15