我正在尝试按照
here所述的指令在Ubuntu 11.10上编译OpenCV版本2.3.1.我收到了以下错误.无法理解发生了什么… /usr/local/lib/libavcodec.a存在但链接器无法链接它或其他东西?
错误:
[ 20%] Built target pch_Generate_opencv_highgui Linking CXX shared library ../../lib/libopencv_highgui.so /usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32S against `av_destruct_packet' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libavcodec.a: could not read symbols: Bad value collect2: ld returned 1 exit status