opencv arm上安装和编译问题!!!!

sealevel2009 2009-10-30 11:16:31
按照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<char, std::char_traits<char>, std::allocator<char> > const&, cv::Mat const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > 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<int, std::allocator<int> > 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<int, std::allocator<int> > 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


安装网站上面的另外的一个编译命令出现同样的错误
请教各位高手这是什么问题…………
谢谢………………
...全文
2377 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
zmy12007 2010-03-29
  • 打赏
  • 举报
回复
哦,还加了个 lrt ,这个是时间相关的库
zmy12007 2010-03-29
  • 打赏
  • 举报
回复
加 ljpeg 和 lpng lpthread 后只有很少错误了,就是 lz 导致的,我加了也没有用,哪位高手帮忙解答一下
zmy12007 2010-03-28
  • 打赏
  • 举报
回复
我觉得编译的时候没有交叉编译 jpeg,png 和 zip库导致的,但是这样做好麻烦
shidiwong 2010-03-15
  • 打赏
  • 举报
回复
请问楼主后来是怎么解决问题的?我编译的时候也是一堆错误,如下:
#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':
sealevel2009 2009-10-30
  • 打赏
  • 举报
回复
自己顶起下……
myearth 2009-10-30
  • 打赏
  • 举报
回复
帮顶,关注

19,498

社区成员

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

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