pro 文件中的 Libs 选项不适用于 Dll 文件,它适用于 lib 文件。尝试 LIBS += "C:\openCV24\opencv_bin\lib\*.lib"。由于链接顺序,“*.lib”的使用也可能会导致问题。
此处更新
是我的 OPENCV 专业文件模板。此外,您应该将 opencv bin 文件夹添加到您的路径中。
#begin{opencv}
INCLUDEPATH += "C:\opencv\opencv\build\include"
INCLUDEPATH += "C:\opencv\opencv\build\include\opencv"
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_calib3d231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_contrib231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_core231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_features2d231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_flann231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_gpu231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_haartraining_engine.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_highgui231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_imgproc231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_legacy231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_ml231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_objdetect231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_ts231.lib
LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_video231.lib
#end{opencv}