arm下cmake编译opencv出现问题了

qq_35663849 2017-03-31 12:47:28

请问是什么原因,sudo make就出错
...全文
771 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
papaofdoudou 2017-03-31
  • 打赏
  • 举报
回复
zlib需不需要单独额外编译?
opencv2.4.4移植到ARM 一、编译环境及库文件 linux环境:ubuntu 11.10 交叉编译:4.6.1 opencv: opencv-2.4.4 cmake: cmake-2.8.1-Linux-i386.tar.gz 二、opencv-2.4.4的移植过程 解压cmake-2.8.1-Linux-i386.tar.gz到/usr/local/ cmake-2.8.1 #export PATH= /usr/local/ cmake-2.8.1/bin:$PATH 用到的主要目录说明: 交叉编译工具链所在目录 /usr/local/arm-4.6.1/ 安装opencv的目录 /usr/local/ opencv源码所在目录 /usr/local /opencv-2.4.4 编译好的opencv库所在目录 /usr/local /opencv-2.4.4/build 默认安装目录为/usr/local #mkdir build #cd build #cmake-gui 选择源代码目录 /usr/local /opencv-2.4.4 选择Build目录 /usr/local /opencv-2.4.4/build 点击Configure,保持generator为Unix Makefiles,选择Specify options for cross-compiling,点击Next, Operating System填写arm-linux C Compilers填写/usr/local/arm-4.6.1//bin/arm-none-linux-gnueabi-gcc C++ Compilers填写/usr/local/arm-4.6.1//bin/ arm-none-linux-gnueabi -g++ 程序库的Target Root填写/usr/local/arm-4.6.1/ 然后点击Finish,开始configure 点击Generate生成Makefile(等configure完之后按钮才能点击) #make 错误一: Linking CXX executable ../../bin/opencv_createsamples ../../lib/libopencv_core.so: undefined reference to `clock_gettime' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFerrorHandler' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFrealloc' ../../lib/libopencv_core.so: undefined reference to `pthread_key_create 解决方法: 修改CMakeCache.txt,CMAKE_EXE_LINKER_FLAGS原来为空,加上-lpthread -lrt,重新编译,错误消除 错误二: Linking CXX executable ../../bin/opencv_createsamples ../../lib/libopencv_highgui.so: undefined reference to `_TIFFerrorHandler' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFrealloc' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFmalloc' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFmemcpy' ../../lib/libopencv_highgui.so: undefined reference to `TIFFOpen' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFfree' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFwarningHandler' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFmemcmp' ../../lib/libopencv_high

21,597

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧