Hi!

I have Windows 8.1 64bit and i installed QtCreator 5.4.1 with MinGw 4.9.1. I would like to make some simple console programs using
my text editor, not QtCreator, and compile/run them using the terminal.
Qt Code:
  1. //test code.
  2. #include <QCoreApplication>
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. int main(int argc, char *argv[])
  8. {
  9. QCoreApplication a(argc, argv);
  10.  
  11. cout << "Hello!" << endl;
  12.  
  13. return a.exec();
  14. }
To copy to clipboard, switch view to plain text mode 

Terminal command i used:
Qt Code:
  1. g++ -o test main.cpp
To copy to clipboard, switch view to plain text mode 

Error message:
main.cpp:1:28: fatal error: QCoreApplication: No such file or directory
#include <QCoreApplication>
compilation terminated.
I added "C:\Qt\Tools\mingw491_32\bin" in "Environment Variables" so, when i enter with g++ --version in terminal i get "g++ ... 4.9.1".

How can i do what i want?