Error: undefined reference to ‘CV:: xxx’ encountered in using OpenCV in QT

Open the debug button to see if the build suite has been modified or not

You need to ensure that the build kit is x86 or x64 relative to OpenCV

After switching to mingw32 bit, it runs successfully.

Read More: