3

Qt: qt-sdk-win-opensource-2010.01 Mingw: 1686-mingw32-gcc-4.6.3-release :

The .pro file:

TEMPLATE    = app
TARGET      = 
SOURCES     += ef.cpp
DEPENDPATH  += .
INCLUDEPATH += . 

The .cpp:

#include <stdio.h>    
int main(int argc, char *argv[]) 
{
    printf ("\nhjhjk\n");
}

The compilation and the executable output is as follows:

enter image description here

The executable called temp and an object file called ef.o get created in the debug folder.

I have edited the qmake.conf file as described here.

The print statement doesn't get printed. Please help.

Community
  • 1
  • 1
Aquarius_Girl
  • 21,790
  • 65
  • 230
  • 411

1 Answers1

2

Try adding CONFIG+=console to your .pro file

Adrien BARRAL
  • 3,474
  • 1
  • 25
  • 37
  • "Extremely" grateful to you. I had spent looking in wrong direction past 2 days. – Aquarius_Girl Nov 06 '12 at 07:39
  • I think this is a windows issue. Linux doesn't "need" that statement. – Aquarius_Girl Nov 06 '12 at 07:45
  • 1
    Yes, from the reference documentation it is written : "The target is a Win32 console application (app only). The proper include paths, compiler flags and libraries will automatically be added to the project.", So yes it is only true on Windows. – Adrien BARRAL Nov 06 '12 at 07:49