본문 바로가기
C&C++/빌드 에러

.a 사용시 recompile with -fPIC 하라는 에러

by 어다프 2020. 8. 11.

https://stackoverflow.com/questions/13812185/how-to-recompile-with-fpic

 

How to recompile with -fPIC

I was trying to reinstall my ffmpeg, following this guide, on my ARM Ubuntu machine. Unfortunately, when I compile a program which uses this lib I get the following failure: /usr/bin/ld: /usr/loca...

stackoverflow.com

 

툴체인 환경설정 CFLAGS 추가 (-fPIC) 후 .a 다시 빌드

export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -fPIC"