I downloaded the OpenCV source code and used CMake-GUI to configure various project properties to generate a VS2022 project. When generating the solution, I also included the OpenCV examples, and the compilation passed smoothly without any issues. However, when I tried to run the examples, a prompt appeared saying that “libpng16.dll is missing”. I noticed in the project that the third-party library libpng was built as a static library, so why am I still getting this prompt about the missing libpng16.dll? And where can I find this file?
Are you still have a such problem?
I suspect that I am experiencing this issue because I chose Qt6, specifically because I chose Qt6 and did not select the opencv_world module. But when I select opencv_world, there will be another error called ‘__itt_string’header * (const wchar_t *)’: unable to convert parameter 1 from ‘const char [29]’ to ‘const wchar_t *’. In the end, I chose 5.15.2 to compile and solved the above problems, but when I chose to add the opencv_contrib module, I encountered a new problem, which was really a headache.