如何使用 qt Creator 配置 opencv 2.3 以使用 qt sdk 安装中的 Stock mingw 编译器
很抱歉问了一些人已经问过的问题.. 但即使经过很多天的搜索和尝试,我仍无法使 opencv 与 qt Creator 一起工作。 希望任何人都能给我这样做的步骤。
上次我尝试仅调用一个 opencv 特定函数来检查它是否正确编译,但它给出了一些由于链接问题而导致的错误,我已经使用我的 mingw 编译器从代码块构建了 opencv 库,如一些教程中所述,即使这样也不起作用。
我收到这个错误
:-1:错误:找不到-lopencv_core
:-1: 错误:collect2: ld 返回 1 退出状态
我的pro文件如下所示
QT += core
TARGET = Open_cv_integration
CONFIG += console
TEMPLATE = app
SOURCES += main.cpp
LIBS +=“C:/opencv2.2MinGW/lib/libopencv_core231.dll.a”
LIBS +=-lm -lopencv_core -lopencv_highgui -lopencv_video -lopencv_imgproc
Sorry for asking a question thats already asked by some..
But even after many days of search and tries i couldnt make opencv work with qt creator..
Hope any body can give me the steps for doing so.
Last time i tried by calling just one opencv specific function to check if it compiles correctly, but its giving some errors which are due to linking problems, i have built the opencv library using my mingw compiler from code blocks as described in some of the tutorials, even that didnt work.
I'm getting this error
:-1: error: cannot find -lopencv_core
:-1: error: collect2: ld returned 1 exit status
My pro file looks as follows
QT += core
TARGET = Open_cv_integration
CONFIG += console
TEMPLATE = app
SOURCES += main.cpp
LIBS += "C:/opencv2.2MinGW/lib/libopencv_core231.dll.a"
LIBS += -lm -lopencv_core -lopencv_highgui -lopencv_video -lopencv_imgproc
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应该为你工作。
QtCreator有很好的帮助,里面说了如何将lib添加到项目中。
should work for you.
QtCreator has very good help, and there is said how to add lib to project.