5.12.0 static build error: "Project ERROR: Unknown module(s) in QT: multimedia multimediawidgets"
Ive built a copy of qt 5.12.0 for static linking. I use multimedia / multimediawidgets in my application. I have this warning in the issues tab:
Project ERROR: Unknown module(s) in QT: multimedia multimediawidgets
and I get
C1083: Cannot open include file: 'QMediaPlayer': No such file or directory
when i try to run the application.
the application runs as expected when i use a normal non-static QT version (usually I use the standard "Desktop QT 5.12.0 MSVC2017 64bit2" kit
how can i get my static version to recognize those modules / include those files properly? I am running windows 10 64bit
@4oh4 Did you build these modules as static?
I do not know how to do that, the guides i saw for how to build the main qt 5.12.0 only showed those files only and not any particular modules or how to properly include them.
I assume I would get them from https://download.qt.io/archive/qt/5.12/5.12.0/submodules/ and use the qtmultimedia-everwhere-src-5.12.0.zip, how do i build that statically? Or is it something that I would needed to have taken into account when doing the initial nmake/jom for the main qt kit?
sorry its probably a really obvious / novice question, I'm new to the static building/linking thing (really, new to everything other than just writing cpp and pressing run...)
@4oh4 No need for submodules. You already downloaded (or checked out) Qt source code I guess? If so there should be many subdirectories, one of them should be qtmultimedia. Go there and call qmake from your own static Qt build (use absolute path to make sure you're using correct qmake), then "make" and "make install". Same for all other modules you need.
done it (had to do it twice because it compiled the module as x86 instead of 64 for some reason and caused errors when i tried to run it)
now it gives me
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
when i try to launch the application. Is this related? also only happens on static. Googling the error, everything seems to be related to the qt python bindings / pyside2 which this project isn't using...(ii did try to install them at one point but never used them, not sure if this is relevant-just that every other result on google for that error mentioned it)
This is getting really frustrating :\
The plugins should be statically linked. That error is usually happening with the shared version when an application has not been properly deployed.
That error is usually happening with the shared version when an application has not been properly deployed.
What do you mean shared? is that as opposed to the static build i've been trying to do?
Sorry but I don't understand how your post is meant to help me.
The application hasn't been 'deployed' (windeployqt? which i shouldn't need to do anyway because its meant to be static/standalone) yet because I'm still working on it in creator. The other plugins i need are now statically built / installed as was in an above response. The only thing that doesn't show up is the windows in "%QTDIR%\plugins\platforms" (I needed to add QT_QPA_PLATFORM_PLUGIN_PATH to windows environment variables)
ive rebuilt the 5.12 static version multiple times now with other different configs to try to get it to work and the windows plugin simply never exists in plugins\platforms\