Sto cercando di compilare OpenCV versione 2.3.1 su Ubuntu 11.10 seguendo le istruzioni descritte here. Sto ottenendo l'errore seguente. Non riesco a capire cosa sta succedendo ... /usr/local/lib/libavcodec.a
esiste ma linker non può collegarsi ad esso, o qualcos'altro?Errore strano del linker durante la compilazione di OpenCV2.3.1 su Ubuntu 11.10
errore:
[ 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
hai provato la compilazione con -fPIC come suggerisce l'errore? – RCE
Compila cosa? OpenCV stesso? –
@RCE Come aggiungo il flag -fPIC al compilatore/linker? Dovrei modificare MakeFile? –