Now my application is finish (only some little modification) and I run in windows mode and works ok. I use Qt because i want to run in windows and linux mode. But when i run in linux mode, compiled and linked ok but run bad. I have this message in linux terminal windows:

QCoreApplication::applicationDirPath: Please instantiate the QApplication object first

My main.cpp is:

Qt Code:
  1. Q_INIT_RESOURCE(qtdam);
  2.  
  3. QApplication *app = new QApplication(argc, argv);
  4. QString path=app->applicationDirPath();
  5. lang.setfile_idioma(path+"/languages.lng");
  6. if (lang.idioma_seleccionado=="Español")
  7. splash->setPixmap(QPixmap(":/images/splash_espagnol.png"));
  8. else
  9. splash->setPixmap(QPixmap(":/images/splash.png"));
  10. splash->show();
  11. Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
  12. splash->showMessage(lang.leer_idioma("1"),topRight, Qt::white);
  13. MainWindow mainWin;
  14. mainWin.show();
  15. splash->finish(&mainWin);
  16. delete splash;
  17. return app->exec();
To copy to clipboard, switch view to plain text mode 

the splash screen (*.png) works and read the language.lng ok because it puts the correct png, but it stop there. I have to do Ctrl+C to stop the application.

What's happend???

PS: I have Mandriva 2007