我正在尝试在 odroid 板上将 opencv 与 xubuntu 一起使用。
下载opencv2.4.8并执行以下命令
cmake -D CMAKE_BUILD_TYPE=REALEASE _D CMAKE_INSTALL_PREFIX=/usr/local/opencv
make
其次是 opencv linux安装
但是当我输入make
.
[ 9%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_v4l.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_sunras.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_base.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_bmp.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_pxm.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_imageio.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_jpeg2000.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_png.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_exr.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_tiff.cpp.o
[ 11%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_jpeg.cpp.o
[ 11%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/bitstrm.cpp.o
Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/bin/ld: cannot find -lopenal
/usr/bin/ld: cannot find -lxvidcore
/usr/bin/ld: cannot find -lx264
/usr/bin/ld: cannot find -lssh
/usr/bin/ld: cannot find -lmodplug
/usr/bin/ld: cannot find -lfaac
/usr/bin/ld: cannot find -lopenal
/usr/bin/ld: cannot find -lxvidcore
/usr/bin/ld: cannot find -lx264
/usr/bin/ld: cannot find -lssh
/usr/bin/ld: cannot find -lmodplug
/usr/bin/ld: cannot find -lfaac
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_highgui.so.2.4.8] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
如果我错过了一些库,请告诉我需要什么样的库以及我应该做什么。
我通过下载这些库解决了这个问题。
libopenal-dev
libxvidcore-dev
libx264-dev
libssh-dev
libmodplug-dev
libfaac-dev
libopenal-dev
libxvidcore-dev
libx264-dev
libssh-dev
libmodplug-dev
libfaac-dev
但出现此错误。
Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/local/lib/libavcodec.a(videodsp_armv5te.o): In function `ff_prefetch_arm':
/home/odroid/odroid-sources/sources/ffmpeg/libavcodec/arm/videodsp_armv5te.S:29:(.text+0x8): relocation truncated to fit: R_ARM_THM_JUMP19 against symbol `ff_prefetch_arm' defined in .text section in /usr/local/lib/libavcodec.a(videodsp_armv5te.o)
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_highgui.so.2.4.8] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2