您的位置:首页 > 运维架构 > Linux

Linux下Eclipse编译时,报recompile with -fPIC错误,解决方法

2012-08-02 14:35 375 查看
今天编译一个包含有sqlite3.c的工程时报告

relocation R_X86_64_32 against `‘。rodata' can not be used when making a shared object; recompile with -fPIC

错误。解决方法是:右键Eclipse工程,propertise->c/c++ build->settings->GCC C Compiler->Command: 

gcc 后面加上-fPIC,重新编译,解决。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐