I'm using ubuntu-11.04,
My application works good with shared version of Qt libs.
But there is a damn problem with statically linked version of Qt, indeed it compiles and links successfully but it can't run!!
I also test 'qmusicplayer' from Qt's example folder, message are similar with static version of Qt-4.6.2 and Qt-4.8.2:
Qt Code:
  1. srazi@SRazi-Linux:~/qmusicplayer$ ./qmusicplayer
  2. WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface
  3. ASSERT: "QCoreApplication::instance()" in file ../../phonon/factory.cpp, line 378
  4. Aborted
  5. srazi@SRazi-Linux:~/qmusicplayer$
To copy to clipboard, switch view to plain text mode 
Please see the line 359:
Qt Code:
  1. // ../../phonon/factory.cpp
  2. /* line 354 */ #ifndef QT_NO_DBUS
  3. if (!QCoreApplication::instance() || QCoreApplication::applicationName().isEmpty()) {
  4. pWarning() << "Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface";
  5. }
  6. #endif
  7. /* line 359 */ Q_ASSERT(QCoreApplication::instance());
  8. const QByteArray platform_plugin_env = qgetenv("PHONON_PLATFORMPLUGIN");
  9. if (!platform_plugin_env.isEmpty()) {
  10. QPluginLoader pluginLoader(QString::fromLocal8Bit(platform_plugin_env.constData()));
  11. if (pluginLoader.load()) {
  12. m_platformPlugin = qobject_cast<PlatformPlugin *>(pluginLoader.instance());
  13. if (m_platformPlugin) {
  14. return m_platformPlugin;
  15. }
  16. }
  17. }
  18. const QString suffix(QLatin1String("/phonon_platform/"));
  19. ensureLibraryPathSet();
  20. QDir dir;
  21. dir.setNameFilters(
  22. !qgetenv("KDE_FULL_SESSION").isEmpty() ? QStringList(QLatin1String("kde.*")) :
  23. (!qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty() ? QStringList(QLatin1String("gnome.*")) :
  24. );
  25. /* line 378 */ dir.setFilter(QDir::Files);
To copy to clipboard, switch view to plain text mode 
what's going wrong here? Why (and how?!!!!!!!!!!) 'QCoreApplication::instance()' at line 359 return NULL?