Home >Backend Development >C++ >Why does recompiling with -fPIC resolve linking errors?
Recompiling with -fPIC: Resolving Linking Errors
Recompiling with -fPIC is necessary when encountering the error "relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object." This error occurs when linking an object file with a restricted symbol, which cannot be used when combined with a shared object.
To successfully address this issue and recompile with -fPIC:
By implementing these steps, you can recompile your ffmpeg with -fPIC, thereby resolving the linking error and enabling successful compilation of your program that utilizes the ffmpeg library.
The above is the detailed content of Why does recompiling with -fPIC resolve linking errors?. For more information, please follow other related articles on the PHP Chinese website!