[Libav-user] compiling ffmpeg with -fPIC

Gavin Kinsey gkinsey at ad-holdings.co.uk
Fri May 3 12:32:56 CEST 2013


On Wednesday 01 May 2013 15:41:48 Dayana wrote:
> Hi!!! Im developing an aplication using libavcodec, libavformat and
> libavutil. Im trying to make a shared library and for that I have to get
> libavs compiled with -fPIC ... I was trying to do it by setting
> --enable-pic in the configure file, however Im still have the same error:
> 
> /usr/local/lib/libavcodec.a(lpc_mmx.o): relocation R_X86_64_PC32 against
> symbol `ff_pd_1' can not be used when making a shared object; recompile
> with -fPIC

If you are trying to combine several ffmpeg libraries into a single shared 
library as I have seen some apps try to do then you need to use the 
following linker flag on the final library build step.

-shared -Wl,-Bsymbolic

-- 
Gavin Kinsey
AD Holdings Plc


--------------------------------------------------------
This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to whom they are addressed. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system; you may not copy this message or disclose its contents to anyone. The recipient should check this email and any attachments for the presence of viruses. The Company accepts no liability for any damage caused by any virus transmitted by this email. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the Company. Contact Customer Services for details customerservices at dmicros.com


More information about the Libav-user mailing list