I wanted to accommodate myself with Qt5 and so I started a very small mp3 player. It compiles on Linux and Windows 7, both 64 bit.
When running on Windows however the selected mp3 file will only start playing when I start the program within QtCreator. When I start the standalone (shared compiled) EXE the program opens but instead starting the playback nothing happens (when debugging inside the IDE everything seems to work, sort of a Heisenbug I guess).
When looking at the file access in Processmonitor I see the directory scan, however when the MP3 should be opened nothing happens.
Maybe I missed to copy a DLL, however I have no hint which one is missing, so it may be another issue. Dependency Walker output (though it does not tell me which files/funcionts cause the errors, maybe I missed it):
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
This is my directory content from where I try to start the EXE
- folder "platforms" including: qminimal.dll, qwindows.dll
- icudt49.dll, icuin49.dll, icuuc.49.dll
- IEShims.dll (works without it, however Dependency Walker told its missing)
- libEGL.dll
- libgcc_s_sjlj-1.dll
- libGLESv2.dll
- libstdc++-6.dll
- libwinpthread-1.dll
- Qt5Core.dll, Qt5Gui.dll, Qt5Multimedia.dll, Qt5Network.dll, Qt5Widgets.dll
- purr.exe
You can look at the complete source @ https://github.com/VashSan/purr - part of the source code where i start the playback:
void PurrWindow::playMedia()
{
// [...]
// QMediaPlayer is a member of PurrWindow:
QUrl media = QUrl::fromLocalFile(selectedFile);
player.setMedia(media);
player.play();
}
I compiled the program once with MSVC2010 and once with Mingw with no difference.
I tried to google QMediaPlayer errors but most of them concern mobile platforms. However it did not leave a good impression of the QMediaPlayer to me, maybe I should look at a more reliable playback library. However if it would just start playback I'd be happy.
selectedFile
show as accessible (i.e., exists and readable)? – Kaleb Pederson