Qt5 - QtMultimedia Include Errors
I am trying to run some of the new QtMultimedia examples included in Qt5.
When I try them in QtCreator they all can be build successfully, but I get the "service not found error" I described here: http://qt-project.org/forums/viewthread/22018/
Then I tried them in VS2010 but there they all don't work. I included QtMultimedia in the project settings but get the error:
c:\qtsdk_5\5.0.0-beta2\msvc2010\include\qtmultimedia\qmediaobject.h(48): fatal error C1083: Cannot open include file: 'qtmultimediadefs.h': No such file or directory
This happens if I just include for example <QtMultimedia\QMediaPlayer> in an empty project like this:
int main(int argc, char *argv)
Tested on WinXP and Win8
Add this line to your project (.pro) file, to include the Qt Multimedia module:
QT += multimedia
The same applies for other modules. For example, if you want the Qt Network and Qt SQL module, you'll add something like
QT += network sql
That's wat i did when I created the projects in QtCreator.
In VS2010 I included the QtMultimedia libs in the project settings at the beginning, but it seems that the multimedia library can't be found, because I have to add for example
manually inside the example files..
That's interesting. Which example did you try to build? I have VS2010, and it built the Video Widget example fine (However, the program doesn't run properly... same issue as http://qt-project.org/forums/viewthread/22024/ )
Also, did you update your MSVS? I followed the upgrade steps at http://qt-project.org/wiki/Building-Qt-5-from-Git#aea23489ce3aa9b6406ebb28e0cda430