0

I am developing a Qt project in C++ by using Visual Studio 2015. The project is in 64-bit Release mode. The project is working successfully. cout does not print to console anything. I have done those two configuration as such:

  1. Project Properties/Linker/System/Subsystem is Console.

  2. Tools/Options/Debugging/General/Redirect All output window text to immediate window is checked.

In order to use std::cout , related code is like that:

#include "iostream"

using namespace std;

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    cout << "hello" << endl;

    return app.exec();
}

The console appears but it still does not print to console.

Edit 1: Actually, it opens two console windows. One of them just appears and disappears. Other one appears but there is nothing in it.

Edit 2: This Qt project was built firstly in Visual Studio 2013 with Qt5.5. Then I rebuilt in Visual Studio 2015 with Qt 5.8. Then, this problem has occured

michael scolfield
  • 401
  • 1
  • 4
  • 20

0 Answers0