Cannot include QMediaPlayer and QVideoWidget
I'm using Qt 5.4.2 x64 version compiled from source qt-everywhere-opensource-src-5.4.2.zip with Windows 7 x64 and MSVS2013 x64 with Qt VS Addin 1.2.4.
My Qt configuration command is:
configure -debug-and-release -platform win32-msvc2013 -skip script -skip webkit -skip connectivity -skip quick1 -skip quickcontrols -skip sensors -skip webengine -skip webchannel -nomake examples -nomake tests
After nmake, I have the following include and lib folders:
The problem is, when I try to include QMediaPlayer or QVideoWidget in my MSVC project, compiler cant find them in Qt include files. I'm checked Qt include directory and found that
folders contain just one file QtMultimediaDepends and QtMultimediaWidgetsDepends instead of include files. Also it is strange for me that in ...\lib\ folder I found according dll and lib files:
Qt5Multimedia.lib Qt5Multimediad.lib Qt5Multimedia.dll Qt5Multimediad.dll Qt5MultimediaWidgets.lib Qt5MultimediadWidgetsd.lib Qt5MultimediaWidgets.dll Qt5MultimediadWidgetsd.dll
The quistion is where are Multimedia include headers and how to include and use Multimedia in my project?
Thanks in advance for any help.
I'm not sure for the zip source package, but at least for the sources installed from the online installer the headers of QtMultimedia are placed next to
qbasedirectory, not inside it.
Also, to make your life easier you should use a prefix in your configure step and after compilation call 'nmake install' i.e.
configure -prefix "C:\Some path\" ... nmake nmake install
This would build Qt in the current directory and then copy over everything needed in their right places to the prefix directory. You can then safely delete the build directory and save a lot of space, since it contains all the intermediate build artifacts that you don't need. All the includes would be placed in a single
<prefix dir>\includedirectory for you, such as they are in the precompiled packages.