gcc编译动态库的时候提示 error adding symbols: 错误的值
2017-08-31 10:50
585 查看
问题:
/usr/bin/ld: base64.o: relocation R_X86_64_32S against `base' can not be used when making a shared object; recompile with -fPIC
base64.o: error adding symbols: 错误的值
collect2: error: ld returned 1 exit status
解决:
生成.o 文件的时候少加了参数-fPIC
gcc -fPIC -c -I"/usr/lib/jvm/jdk1.8.0_144/include" -I"/usr/lib/jvm/jdk1.8.0_144/" base64.c
/usr/bin/ld: base64.o: relocation R_X86_64_32S against `base' can not be used when making a shared object; recompile with -fPIC
base64.o: error adding symbols: 错误的值
collect2: error: ld returned 1 exit status
解决:
生成.o 文件的时候少加了参数-fPIC
gcc -fPIC -c -I"/usr/lib/jvm/jdk1.8.0_144/include" -I"/usr/lib/jvm/jdk1.8.0_144/" base64.c
相关文章推荐
- 编译fdk-aac,执行批处理的时候出现这个错误,mingw32-gcc.exe: error: CreateProcess: No such file or directory的问题
- Xamarin IOS无法编译的时候报Xamarin.iOS.Common.targets error,但无其他错误提示
- qt opencv编译错误 /usr/local/lib/libopencv_imgcodecs.so.3.1:-1: error: error adding symbols: DSO missing from command line
- SecureCRT终端显示gcc编译错误提示乱码问题
- 关于JAVA文件都在没问题,没有错误提示波浪线,但编译时候提示找不到对应包的问题
- 在Ubuntu gcc下编译c程序,错误如下: test.c:3: error: expected ';', ',' or ')' before '&' token
- 交叉编译opencv2.4.13出错:libzlib.a: error adding symbols: Bad value
- 使用gcc编译时错误提示: ld returned 1 exit status问题
- SecureCRT终端显示gcc编译错误提示乱码问题
- sublime text 3+mingw编译代码时错误提示:g++:error:No Such FIle or directory(已解决)
- 用Gcc编译C文件时出现错误,提示用c99标准
- gcc 编译时碰到的一些错误提示整理
- 内核编译时提示错误error: sys/types.h: No such file or directory
- Linux ubuntu 14.04 x86_64平台 gcc编译错误 Error: unsupported instruction `mov' 及ld链接错误
- SecureCRT终端显示gcc编译错误提示乱码问题
- Python编译时提示错误 IndentationError: unexpected indent
- VS2005编译的时候提示“无法启动调试。绑定句柄无效”的错误怎么办?
- 解决编译时出错提示: 'error: array must be initialized with a brace-enclosed initializer' 的错误
- luarocks install *错误之Error: No results matching query were found. && gcc编译
- IDEA在代码上无错误提示,但是编译时出现error:非法字符