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.
//test code.
#include <QCoreApplication>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
cout << "Hello!" << endl;
return a.exec();
}
//test code.
#include <QCoreApplication>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
cout << "Hello!" << endl;
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Terminal command i used:
g++ -o test main.cpp
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?
Bookmarks