您的位置:首页 > 移动开发 > Objective-C

relocation R_X86_64_32 against `.rodata' can not be used when making a shared object;

2013-12-27 15:55 1301 查看
relocation R_X86_64_32 against `.rodata' can not be used when making a shared object;

我在编译VLC时遇到这个问题:

relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

... could not read symbols: Bad value

编译器提示:recompile with -fPIC

两种方式:

(1)在makefile文件里的CFLAGS里加上 -fPIC选项,这样可以一劳永逸

(2)如果你的makefile很大,CFLAGS也不明确,那就在配置时手动加上,即:

$CFLAGS="-fPIC" ./configure ..............

如果这样还不行,你需要试一下sudo

即:

$sudo CFLAGS="-fPIC" ./configure ..............
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐