Could not find corresponding DLL from ffmpeg library

Hi, everyone, when I tried to compile ovito on Windows platform, I met an error as below:
--------------separation line----------------
Could not find corresponding DLL from ffmpeg library
“P/libavformat.DLL.a” in the same directory.
--------------seperation line----------------
How should I do to solve this? Anyone can help? Thanks!

Hi,

Ovito normally expects the ffmpeg libraries to be built from source source. I’m not sure where you got your ffmpeg libraries from.

You can try to comment out this part of the CMake script, which produced the error: src/ovito/core/CMakeLists.txt · master · Alexander Stukowski / ovito · GitLab

This script copies the ffmpeg DLLs into the Ovito program directory to make them available at runtime. You can try to do the copying by hand instead.

Note that Ovito can also be built without the ffmpeg libraries, but then you will loose the program’s capability to write encoded video files.

Thanks, stukowski. I changed the “libavformat.dll” to “avformat.dll” and it works.
But later I met the problem as below:

----------------seperation line--------------
ovito-master\src\ovito\gui\desktop\actions\FileActions.cpp: In lambda function:ovito-master\src\ovito\gui\desktop\actions\FileActions.cpp:58:35: error: ‘QT_UNICODE_LITERAL’ was not declared in this scope 58 | QString informativeText = QStringLiteral(OVITO_COPYRIGHT_NOTICE); | ^~~~~~~~~~~~~~make[2]: *** [src\ovito\gui\desktop\CMakeFiles\Gui.dir\build.make:611: src/ovito/gui/desktop/CMakeFiles/Gui.dir/actions/FileActions.cpp.obj] Error 1mingw32-make[1]: *** [CMakeFiles\Makefile2:1337: src/ovito/gui/desktop/CMakeFiles/Gui.dir/all] Error 2mingw32-make: *** [Makefile:145: all] Error 2
----------------seperation line--------------
Thanks a lot!

I’m not sure, but this issue could be due to an incompatible version of the Qt framework. Which version are you using? Ovito is normally built with Qt 5.15.x, but Qt 5.12.x works as well. If you are using the new Qt 6.2.x, you should set the CMake option OVITO_QT_MAJOR_VERSION to “Qt6”.