QT.no service found for - “org.qt-project.qt.mediaplayer” on building static

安稳与你 提交于 2019-11-30 19:46:28

问题


Hello in order to build static QT for Windows, I followed the next article.

http://qt-project.org/wiki/How-to-build-a-static-Qt-for-Windows-MinGW

Using QT vesion – 5.2.0. Operating System- Windows7. The problem is that it says – no service found for – “org.qt-project.qt.mediaplayer” on building the project.

I searched the net, but no solution was useful. May be I’m not using them correctly because of some lack of knowledge of QT infrustructure, but anyway If someone could give me some intructions of solving of this problem, I would really appreciate that.


回答1:


I'm using statically Qt 5.2.1 OpenGL MinGW and had same problem (video wasn't playing with same "no service found"). In my case I solved the problem linking the static mediaplayer plugin (dsengine) in project. To do this I had to:

1) add in .pro file:

CONFIG += static
static:{
QTPLUGIN += dsengine
CONFIG += release
LIBS += -ldsengine
}

dsengine plugin is located in %QTDIR%/plugins/mediaservice/libdsengine.a

2) add somewhere in the code (around main.cpp):

#ifdef QT_STATIC
#include <QtCore/QtPlugin>
Q_IMPORT_PLUGIN(DSServicePlugin)
#endif


来源:https://stackoverflow.com/questions/22582663/qt-no-service-found-for-org-qt-project-qt-mediaplayer-on-building-static

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!