gpt4 book ai didi

eclipse - ubuntu 上的 opencv - 找不到 lib 文件

转载 作者:太空宇宙 更新时间:2023-11-03 22:01:34 27 4
gpt4 key购买 nike

我正在关注这个 guide :

使用 eclipse juno CDT 让 opencv 在 ubuntu 12.04 上运行。但是当我构建所有时我得到这个错误:

Building target: DisplayImage
Invoking: GCC C++ Linker
g++ -L/usr/local/lib -o "DisplayImage" ./src/DisplayImage.o -lopencv_core\ opencv_imgproc\ opencv_highgui
/usr/bin/ld: cannot find -lopencv_core opencv_imgproc opencv_highgui
collect2: ld returned 1 exit status
make: *** [DisplayImage] Error 1

在eclipse中我添加了:

opencv_core opencv_imgproc opencv_highgui

在“库 (-l)”框中。如果我运行(如指南中所述):

pkg-config --libs opencv

我得到:

/usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_contrib.so /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_features2d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so /usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_ts.so /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_videostab.so  

所以他们似乎存在。但是名称与指南相比有点不同。我试图将 eclipse 中的包含更改为:

libopencv_core.so libopencv_imgproc.so opencv_highgui

但这并没有帮助。有什么想法吗?

编辑:

这是我设置包含的方式:

enter image description here

这就是我设置库(链接器)的方式:

enter image description here

最佳答案

啊,每个库必须在 C++linker->Libraries 框中单独一行。

关于eclipse - ubuntu 上的 opencv - 找不到 lib 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13892126/

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