天天看點

can not be used when making a shared object; recompile with -fPIC

今天遇到這樣一個錯誤:

/usr/bin/ld: /usr/local/lib/libjpeg.a(jcapimin.o): relocation R_X86_64_32S against `jpeg_natural_order' can not be used when making a shared object; recompile with -fPIC      

這意思是,在産生so的時候,不要連結這個庫.如果一定要連結,make加個參數重新編譯.

make -j CFLAGS=-fPIC      

繼續閱讀