openCV 2.4.7 error adding symbols: DSO missing from command line(openCV 2.4.7 添加符号时出错:命令行中缺少 DSO)
问题描述
我遇到了一个自编译 opencv 的问题...
i've got a Problem with a self compiled opencv...
XUbuntu 13.10 x64gcc 版本 4.8.1
XUbuntu 13.10 x64 gcc version 4.8.1
cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -DINSTALL_C_EXAMPLES=开-D INSTALL_PYTHON_EXAMPLES=开-DBUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_OPENMP=ON ..
cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_OPENMP=ON ..
一切看起来都很好.简单的例子就可以了.我的问题是,我想在 xubuntu 中使用 nonfree(SURF) 包.
Everthing looks fine. Simple examples will be work. My problem is, i want to use the nonfree(SURF) package in xubuntu.
现在我想编译这些例子http://docs.opencv.org/doc/tutorials/features2d/feature_detection/feature_detection.html并得到这个错误(主题)
Now i want to compile these example http://docs.opencv.org/doc/tutorials/features2d/feature_detection/feature_detection.html and get this error (Topic)
g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -O0 -g3-Wall -c -fmessage-length=0 -MMD -MP -MF"example.d" -MT"example.d" -o "example.o" "../example.cpp" 完成建筑:../example.cpp
g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"example.d" -MT"example.d" -o "example.o" "../example.cpp" Finished building: ../example.cpp
构建目标:SURF_Example调用:GCC C++ 链接器
Building target: SURF_Example Invoking: GCC C++ Linker
g++ -L/usr/local/lib -o "SURF_Example" ./example.o -lopencv_core-lopencv_imgproc -lopencv_highgui -lopencv_objdetect -lopencv_nonfree
g++ -L/usr/local/lib -o "SURF_Example" ./example.o -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_objdetect -lopencv_nonfree
libopencv_features2d.so.2.4:添加符号时出错:命令行中缺少 DSO
libopencv_features2d.so.2.4: error adding symbols: DSO missing from command line
有什么帮助吗?
推荐答案
可能是链接顺序不正确,缺少lib features2d.试试
Probably, problem is in incorrect linking order and missing lib features2d. Try
g++ -L/usr/local/lib -o "SURF_Example" ./example.o -lopencv_nonfree -lopencv_objdetect -lopencv_features2d -lopencv_imgproc -lopencv_highgui -lopencv_core
这篇关于openCV 2.4.7 添加符号时出错:命令行中缺少 DSO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:openCV 2.4.7 添加符号时出错:命令行中缺少 DSO


基础教程推荐
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01
- 从 std::cin 读取密码 2021-01-01
- 使用从字符串中提取的参数调用函数 2022-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- Windows Media Foundation 录制音频 2021-01-01
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- 管理共享内存应该分配多少内存?(助推) 2022-12-07