R_X86_64_32 & could not read symbols: Bad value编译
来源:互联网 发布:计数排序java实现 编辑:程序博客网 时间:2024/06/02 16:29
在suse64位平台上,libx a是一个静态库,可以编译成功,但另一动态库链接它时报如下错误: usr lib64 gcc x86_64-suse-linux 4 1 0 x86_64-suse-linux bin ld: usr local libx a(z o): relocatio
在suse64位平台上,libx.a是一个静态库,可以编译成功,但另一动态库链接它时报如下错误:/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: /usr/local/libx.a(z.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/libx.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
解决的办法是在编译libx.a时加上“-fPIC”参数,这是一个编译期参数,很少人可能误以为只有共享库才使用到,实际上共享库和静态库的区别主要是链接时,而编译期是相同的,既然是编译参数,那么fPIC用在静态库中也没什么奇怪的了。
0 0
- R_X86_64_32 & could not read symbols: Bad value编译
- R_X86_64_32 & could not read symbols: Bad value
- 动态库编译时(引用静态库)could not read symbols: Bad value
- TTserver 编译/usr/local/lib/libbz2.a: could not read symbols: Bad value解决
- make error: libneon.a: could not read symbols: Bad value
- 解决 liblog4cpp.a: could not read symbols: Bad value
- php make报错:/usr/local/openssl/lib/libssl.a: could not read symbols: Bad value
- /usr/local/lib/libz.a: could not read symbols: Bad value
- recompile with -fPIC /usr/local/lib/libboost_python.a: could not read symbols: Bad value
- CentOS6升级openssl报错libcrypto.a(rsaz_exp.o): could not read symbols: Bad value
- 安装ucspi-tcp的时候出现报错:/lib64/libc.so.6: could not read symbols: Bad value
- /usr/local/lib/libpython2.7.a: could not read symbols: Bad value. collect2: ld retur ned 1 exit
- Could not read symbols解决方法
- Could not read symbols解决方法
- Could not read symbols解决方法
- Could not read symbols解决方法
- could not read symbols报警
- Could not read symbols解决方法
- iOS开发~设备信息
- Hdu 4638 Group 离线+树状数组
- 项目中遇到图片新闻文字分段的问题
- 冒泡排序
- 解决IE6不支持position:fixed;的问题
- R_X86_64_32 & could not read symbols: Bad value编译
- awk命令详解
- 几个系统调用分析 glibc中的malloc调用和共享内存原理
- Cannot create a server using the selected type
- iOS开发~CocoaPods使用详细说明
- jQuery.qrCode.js实现二维码生成
- IOS7开发~UDID解决方法
- 关于cocos2dx中文转UTF8码的解决方案
- Rotate List