gpt4 book ai didi

qt - Qt试图包括openCV库文件

转载 作者:行者123 更新时间:2023-12-02 16:30:45 24 4
gpt4 key购买 nike

我是否正确包含目录中的所有库文件?
LIBS += "C:\openCV24\opencv_bin\lib\*.dll"
因为这条线一直在给我
C:\openCV24\opencv_bin\install\lib*.dll: Invalid argument
香港专业教育学院试图寻找几个地方,并改变了这一行很多次,但似乎无法使其工作。有人可以让我知道我是否错过了一步吗?

我已经提供了includepath,并且可以正常工作INCLUDEPATH += "C:\openCV24\opencv_bin\install\include",但是它的其他库文件引发了错误

Thx真的很烦

最佳答案

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}

关于qt - Qt试图包括openCV库文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12660145/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com