Welcome! Log In Create A New Profile


Problem running programs in Qt Creator

Posted by TraceyB 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Problem running programs in Qt Creator
July 30, 2011 08:42PM
I created the test program that is given on the CD and it ran perfectly.

Now when I create new projects and copy code from the textbook I always get a 'exited with code 0' message and I don't see the output of the program.

Here is an example:

Starting C:\unisa\cos2614\ezust\Exerc1411-build-desktop\debug\Exerc1411.exe...
C:\unisa\cos2614\ezust\Exerc1411-build-desktop\debug\Exerc1411.exe exited with code 0

When I try to compile it from command prompt I don't get any errors but I also don't see a screen.
I copied and pasted the code straight from the textbook and I made the necessary changes given in Tut 102 to the project so it will compile in the command prompt.

Has anybody else had problems?
avatar Re: Problem running programs in Qt Creator
July 30, 2011 09:50PM
It's not an error. It means that the program started, it did it's thing and then it finished. Nothing sinister at all.

If you're looking for output to a console, make sure that you've set the project to compile as a console, since they compile as GUI programs by default.

Check your project file and make sure that the qmake variable CONFIG has console added to it


CONFIG += console
Re: Problem running programs in Qt Creator
July 31, 2011 12:10PM
Thanks, I'm getting there. I'd forgotten to check Run in terminal.
But now when I run it from Qt Creator, I get a dos window opening but all it says is "Press <RETURN> to close this window" and when I run it from command prompt, it waits a couple of seconds and then I get the prompt again.
I'm trying to run exercise where I should be prompted to supply input.
Re: Problem running programs in Qt Creator
August 24, 2011 08:19PM
Tracy, I've got the same problem. Still trying to fix it.

Does anybody know what could be causing it?
Sorry, only registered users may post in this forum.

Click here to login