How do I get MinGW and Qt ready?
Thankfully, Peter Dimov pointed out that Qt comes with MinGW.
I downloaded and installed Qt 4.6.2 (qt-sdk-win-opensource-2010.02.1.exe).
Now Firefox Portable does not work. I downloaded and installed Firefox 3.6.3 (Firefox Setup 3.6.3.exe).
I opened the Qt Command Prompt (start->All Programs->Qt SDK by Nokia v2010.02.1 (open source)->Qt Command Prompt).
I created hello-c++.cpp
//cI created a Makefile
using namespace std;
int main( int argc, char *argv )
cout << "Hello World!" << endl;
all:I compiled hello-c++
I ran hello-c++.exe
I created hello-qt.cpp
#include <QtGui>I compiled a Makefile
int main(int argc, char *argv)
QApplication app(argc, argv);
QApplication::translate("toplevel", "Top-level widget"));
I compiled hello-qt.cpp
I compiled the release version because I only had the release version of Qt.
I ran hello-qt.exe
Error: The application has failed to start because mingwm10.dll was not found.
I copied Qt\2010.02.1\mingw\bin\mingwm10.dll
Error: This application has failed to start because libgcc_s_dw2-1.dll was not found.
I copied Qt\2010.02.1\mingw\bin\libgcc_s_dw2-1.dll
Error: This application has failed to start because QtCore4.dll was not found.
I copied Qt\2010.02.1\bin\QtCore4.dll
Error: The procedure entry point _Z5qFreePv could not be located in the dynamic link library QtCore4.dll.
Thankfully, Tymek pointed out that I needed to use a different QtCore4.dll file
I copied Qt\2010.02.1\qt\bin\QtCore4.dll
Error: This application has failed to start because QtGui4.dll was not found.
I copied Qt\2010.02.1\qt\bin\QtGui4.dll