PDA

View Full Version : Cannot build/compile C++ code



BucketOfFire
21st December 2011, 13:10
Hi all,

I have just downloaded and installed QT Creator 2.4.0 .
Wanted to load and compile a school assignment written in C++, but everytime I try this error pops up:


Error while building project test (target: Desktop)
When executing build step 'qmake'

I've got MinGW installed on my computer, but I'm not sure whether Qt is able to detect it.
Been searching and searching all over the internet trying to fix this problem but I just can't get it right...

Is there someone who knows how to fix this problem?

Kind regards,

Bucket

ChrisW67
22nd December 2011, 06:19
qmake is part of a Qt libraries install not MingW or Qt Creator. It looks much more like you don't have a set of Qt libraries built/installed and Qt Creator configured to find them.

You could also download the Qt SDK, which has libraries, a minimal MingW install, and Qt Creator in one neat bundle.

BucketOfFire
27th December 2011, 10:11
Tried installing Qt SDK first actually, but it had the same problem compiling stuff.
I've also got MingW installed and I'm using it for Eclipse, so it's added to the environment already.

I'll try reinstalling it but I'm quite sure it won't solve the problem. Got any other suggestions?

BucketOfFire
27th December 2011, 15:24
Reinstalled Qt SDK with MingW included, but still no luck...
I'm getting the exact same message as in the first post.

Is there anything else that could be wrong? I'm trying to compile the package attached to this post. Could it be the package is faulty?

7204

stampede
27th December 2011, 19:25
It compiles ok - I downloaded your project, opened Qt creator, selected "Open file (ctrl+O)", navigated to your project dir and opened "gebouw.pro". Next thing was to go to project settings (Ctrl+4) and set "Qt version" to "Qt in PATH". Build was successful after doing this.
Without setting the Qt version in project settings I got the same error, I don't know why and I don't really care :)

BucketOfFire
30th December 2011, 14:28
Ye, this seems to solve the problem :D
Thanks a lot for the help!