Why are you mixing up a Windows API WinMain() entry point with a Qt main() entry point? If you are writing a Qt app, all you need is main() and it will compile and run anywhere:

Qt Code:
  1. #include <QApplication>
  2. #include "mainwindow.h"
  3.  
  4. // I have no idea why you are doing this. Are you blindly copying an example
  5. // from somewhere without having any idea what you are doing? You aren't
  6. // using plugins anywhere in this code.
  7. #ifndef Q_WS_X11
  8. #include <QtPlugin>
  9. #endif
  10.  
  11. int main(int argc, char *argv[])
  12. {
  13. QApplication a(argc, argv);
  14. MainWindow w;
  15. return a.exec();
  16. }
To copy to clipboard, switch view to plain text mode