Compiler configuration for Qt Creator
I am new to Qt and its IDE Qt Creator so pardon my ignorance. When I try to compile my code I get the exception
"Qt Creator needs a compiler set up to build. Configure a compiler in the kit options".
I have installed MingGW for compiling C++ code. However, I am having a problem configuring it for Qt Creator.
Any help will be appreciated. Thanks
I suspect you are using the new 5.0 Qt. It required a bit of prodding for me too.
If you look into Settings > Build & Run > Kits
you should see an auto-detected entry which will probably have an exclamation mark in front and is not editable. Ignore this.
There may be a better way, but I do not know it. And you should probably use 4.x until 5 is out of beta.
You are using Qt Creator 2.6.x, as those are the only ones that have kits.
Please go to Tools>Options>Build & Run>Compilers and add you mingw compiler there. You need to point creator to 'g++' in your mingw installation.
Then head over to the Kits tab and click on the desktop kit that creator should have created for you. In the details there is a field called Compiler (or Tool chain, don't remember). Select your mingw compiler there. Check the debugger field. If it is empty or using the gdb debugger that is part of mingw: Grab a debugger from http://builds.qt-project.org/, install it and point creator to that one. The debuggers delivered as part of mingw are known to not work well with creator.
Do not use the Nokia Qt SDK: Everything in there is terribly outdated by now!
I was also having the same problem, so what I did was this:
sudo apt-get install g++
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
I then closed the QT Creator, restarted it, and it worked.
I do not know which of the above two made it work, but it worked!
链接地址: http://www.djcxy.com/p/68614.html下一篇: 编译器配置为Qt Creator