9447|6

90

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

opencv arm上安装和编译问题!!!! [复制链接]

按照http://www.opencv.org.cn/index.php/%E5%B5%8C%E5%85%A5%E5%BC%8FARM%E7%B3%BB%E7%BB%9F%E4%B8%AD%E5%AE%89%E8%A3%85上的安装过程安装,但我用的交叉编译器为arm-linu-g++ 4.3.3的
安装完成之后用如下命令编译,问题一大堆
显示的错误信息为:
root@tom-desktop:~/桌面/1# arm-linux-g++ camshift.c -o camshift `pkg-config --cflags --libs opencv`
cc1plus: warning: include location "/usr/local/include/opencv" is unsafe for cross-compilation
/home/EABI_4.3.3_EmbedSky_20090812/opt/EmbedSky/4.3.3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: library search path "/usr/local/lib" is unsafe for cross-compilation
/home/EABI_4.3.3_EmbedSky_20090812/opt/EmbedSky/4.3.3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/local/lib/libcv.so when searching for -lcv
/home/EABI_4.3.3_EmbedSky_20090812/opt/EmbedSky/4.3.3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/local/lib/libhighgui.so when searching for -lhighgui
/home/EABI_4.3.3_EmbedSky_20090812/opt/EmbedSky/4.3.3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/local/lib/libcvaux.so when searching for -lcvaux
/home/EABI_4.3.3_EmbedSky_20090812/opt/EmbedSky/4.3.3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/local/lib/libml.so when searching for -lml
/home/EABI_4.3.3_EmbedSky_20090812/opt/EmbedSky/4.3.3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/local/lib/libcxcore.so when searching for -lcxcore
/usr/local/lib/libhighgui.a(lib_highgui_la-loadsave.o): In function `cv::imencode(std::basic_string, std::allocator > const&, cv::Mat const&, std::vector >&, std::vector > const&)':
loadsave.cpp:(.text+0x15a4): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/local/lib/libhighgui.a(lib_highgui_la-grfmt_jpeg.o): In function `cv::jpeg_buffer_src(jpeg_decompress_struct*, cv::JpegSource*)':
grfmt_jpeg.cpp:(.text+0xa8): undefined reference to `jpeg_resync_to_restart'
/usr/local/lib/libhighgui.a(lib_highgui_la-grfmt_jpeg.o): In function `cv::JpegEncoder::write(cv::Mat const&, std::vector > const&)':
grfmt_jpeg.cpp:(.text+0x218): undefined reference to `jpeg_CreateCompress'
grfmt_jpeg.cpp:(.text+0x220): undefined reference to `jpeg_std_error'
grfmt_jpeg.cpp:(.text+0x2cc): undefined reference to `jpeg_destroy_compress'
grfmt_jpeg.cpp:(.text+0x374): undefined reference to `jpeg_set_defaults'
grfmt_jpeg.cpp:(.text+0x388): undefined reference to `jpeg_set_quality'
grfmt_jpeg.cpp:(.text+0x398): undefined reference to `jpeg_start_compress'
grfmt_jpeg.cpp:(.text+0x444): undefined reference to `jpeg_write_scanlines'
grfmt_jpeg.cpp:(.text+0x4fc): undefined reference to `jpeg_finish_compress'
grfmt_jpeg.cpp:(.text+0x5a4): undefined reference to `jpeg_stdio_dest'
/usr/local/lib/libhighgui.a(lib_highgui_la-grfmt_jpeg.o): In function `cv::my_jpeg_load_dht(jpeg_decompress_struct*, unsigned char*, JHUFF_TBL**, JHUFF_TBL**)':
grfmt_jpeg.cpp:(.text+0x880): undefined reference to `jpeg_alloc_huff_table'
/usr/local/lib/libhighgui.a(lib_highgui_la-grfmt_jpeg.o): In function `cv::JpegDecoder::close()':
grfmt_jpeg.cpp:(.text+0x8b8): undefined reference to `jpeg_destroy_decompress'
/usr/local/lib/libhighgui.a(lib_highgui_la-grfmt_jpeg.o): In function `cv::JpegDecoder::readData(cv::Mat&)':
grfmt_jpeg.cpp:(.text+0x9dc): undefined reference to `jpeg_start_decompress'
grfmt_jpeg.cpp:(.text+0xab8): undefined reference to `jpeg_read_scanlines'
grfmt_jpeg.cpp:(.text+0xb8c): undefined reference to `jpeg_finish_decompress'
/usr/local/lib/libhighgui.a(lib_highgui_la-grfmt_jpeg.o): In function `cv::JpegDecoder::readHeader()':
grfmt_jpeg.cpp:(.text+0xc00): undefined reference to `jpeg_std_error'
grfmt_jpeg.cpp:(.text+0xc4c): undefined reference to `jpeg_CreateDecompress'
grfmt_jpeg.cpp:(.text+0xcec): undefined reference to `jpeg_read_header'
grfmt_jpeg.cpp:(.text+0xd54): undefined reference to `jpeg_stdio_src'
grfmt_jpeg.cpp:(.text+0xd6c): undefined reference to `jpeg_resync_to_restart'
/usr/local/lib/libhighgui.a(lib_highgui_la-grfmt_png.o): In function `cv::PngDecoder::close()':
grfmt_png.cpp:(.text+0x68): undefined reference to `png_destroy_read_struct'
/usr/local/lib/libhighgui.a(lib_highgui_la-grfmt_png.o): In function `cv::PngDecoder::readHeader()':
grfmt_png.cpp:(.text+0xa8): undefined reference to `png_create_read_struct'
grfmt_png.cpp:(.text+0xb8): undefined reference to `png_create_info_struct'
grfmt_png.cpp:(.text+0xc4): undefined reference to `png_create_info_struct'
grfmt_png.cpp:(.text+0x13c): undefined reference to `png_set_read_fn'
grfmt_png.cpp:(.text+0x158): undefined reference to `png_read_info'
grfmt_png.cpp:(.text+0x18c): undefined reference to `png_get_IHDR'
grfmt_png.cpp:(.text+0x248): undefined reference to `png_init_io'
/usr/local/lib/libhighgui.a(lib_highgui_la-grfmt_png.o): In function `cv::PngEncoder::write(cv::Mat const&, std::vector > const&)':
grfmt_png.cpp:(.text+0x2e8): undefined reference to `png_create_write_struct'
grfmt_png.cpp:(.text+0x384): undefined reference to `png_create_info_struct'
grfmt_png.cpp:(.text+0x3cc): undefined reference to `png_set_write_fn'
grfmt_png.cpp:(.text+0x3fc): undefined reference to `png_set_compression_mem_level'
..........................由于太长不能发表中间的省略,显示内容基本一样
grfmt_png.cpp:(.text+0x944): undefined reference to `png_set_bgr'
grfmt_png.cpp:(.text+0x950): undefined reference to `png_set_swap'
grfmt_png.cpp:(.text+0x95c): undefined reference to `png_set_palette_to_rgb'
grfmt_png.cpp:(.text+0x970): undefined reference to `png_set_gray_1_2_4_to_8'
/usr/local/lib/libhighgui.a(lib_highgui_la-grfmt_png.o): In function `cv::PngDecoder::readDataFromBuf(void*, unsigned char*, unsigned int)':
grfmt_png.cpp:(.text+0xa34): undefined reference to `png_error'
/usr/local/lib/libcxcore.a(lib_cxcore_la-cxsystem.o): In function `cv::getTickCount()':
cxsystem.cpp:(.text+0xc40): undefined reference to `clock_gettime'
/usr/local/lib/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `icvClose(CvFileStorage*)':
cxpersistence.cpp:(.text+0xef4): undefined reference to `gzclose'
/usr/local/lib/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `icvPuts(CvFileStorage*, char const*)':
cxpersistence.cpp:(.text+0x1540): undefined reference to `gzputs'
/usr/local/lib/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `icvGets(CvFileStorage*, char*, int)':
cxpersistence.cpp:(.text+0x170c): undefined reference to `gzgets'
/usr/local/lib/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `icvRewind(CvFileStorage*)':
cxpersistence.cpp:(.text+0x1838): undefined reference to `gzrewind'
cxpersistence.cpp:(.text+0x18d4): undefined reference to `gzrewind'
/usr/local/lib/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `icvEof(CvFileStorage*)':
cxpersistence.cpp:(.text+0x1968): undefined reference to `gzeof'
cxpersistence.cpp:(.text+0x1a04): undefined reference to `gzeof'
/usr/local/lib/libcxcore.a(lib_cxcore_la-cxpersistence.o): In function `cvOpenFileStorage':
cxpersistence.cpp:(.text+0x163c0): undefined reference to `gzopen'
collect2: ld returned 1 exit status


安装网站上面的另外的一个编译命令出现同样的错误
请教各位高手这是什么问题…………
谢谢………………
此帖出自ARM技术论坛

最新回复

哦,还加了个  lrt  ,这个是时间相关的库  详情 回复 发表于 2010-3-29 00:30
点赞 关注
 

回复
举报

73

帖子

0

TA的资源

一粒金砂(初级)

沙发
 
自己顶起下……
此帖出自ARM技术论坛
 
 
 

回复

64

帖子

0

TA的资源

一粒金砂(初级)

板凳
 
帮顶,关注
此帖出自ARM技术论坛
 
 
 

回复

83

帖子

0

TA的资源

一粒金砂(初级)

4
 
请问楼主后来是怎么解决问题的?我编译的时候也是一堆错误,如下:
#arm-linux-g++ lkdemo.c -o lkdemo `pkg-config --cflags --libs opencv`
/usr/local/lib/opencv/lib/libcv.a(cvcolor.o)(.text+0x5334): In function `$a':
: undefined reference to `cvCbrt'
/usr/local/lib/opencv/lib/libcv.a(cvcolor.o)(.text+0x5350): In function `$a':
: undefined reference to `cvCbrt'
/usr/local/lib/opencv/lib/libcv.a(cvcolor.o)(.text+0x536c): In function `$a':
: undefined reference to `cvCbrt'
/usr/local/lib/opencv/lib/libcv.a(cvcolor.o)(.text+0x57b8): In function `$a':
: undefined reference to `cvCbrt'
/usr/local/lib/opencv/lib/libcv.a(cvfeatureselect.o)(.text+0x3ac): In function `$a':
: undefined reference to `cvMinMaxLoc'
/usr/local/lib/opencv/lib/libcv.a(cvcornersubpix.o)(.text+0x7b0): In function `cvFindCornerSubPix':
: undefined reference to `cvInvert'
/usr/local/lib/opencv/lib/libcv.a(cvlkpyramid.o)(.text+0x99c): In function `cvCalcOpticalFlowPyrLK':
此帖出自ARM技术论坛
 
 
 

回复

65

帖子

0

TA的资源

一粒金砂(初级)

5
 
我觉得编译的时候没有交叉编译  jpeg,png 和 zip库导致的,但是这样做好麻烦
此帖出自ARM技术论坛
 
 
 

回复

63

帖子

0

TA的资源

一粒金砂(初级)

6
 
加 ljpeg 和 lpng lpthread 后只有很少错误了,就是 lz 导致的,我加了也没有用,哪位高手帮忙解答一下
此帖出自ARM技术论坛
 
 
 

回复

80

帖子

0

TA的资源

一粒金砂(初级)

7
 
哦,还加了个  lrt  ,这个是时间相关的库
此帖出自ARM技术论坛
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/7 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表