The. Exe crashed program ends abnormally when the QT project is copied to the new environment

Tip: if the project has been successfully compiled and run on a computer, the code of the project itself is OK

Based on such preconditions, the problem should be directly located in the direction of environment configuration.

The third-party library I use this time is opencv:

        1. Include the opencv path in the project pro file and add the corresponding library file

INCLUDEPATH += D:/openCV/opencv/build/include

LIBS += D:/openCV/opencv/build/x64/vc15/lib/opencv_world451.lib
LIBS += D:/openCV/opencv/build/x64/vc15/lib/opencv_world451d.lib

        2. Find the corresponding. DLL file from the opencv installation path and copy it to the running program path generated by the project

     

Read More: