/usr/bin/ld: client: hidden symbol `__dso_handle' in /usr/lib/gcc/i486-linux-gnu/4.4.3/crtbegin.o is

来源:互联网 发布:大数据金融行业前景 编辑:程序博客网 时间:2024/06/05 22:34

编译源代码时出现错误

/usr/bin/ld: client: hidden symbol `__dso_handle' in /usr/lib/gcc/i486-linux-gnu/4.4.3/crtbegin.o is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status


解决方法:

http://stackoverflow.com/questions/17389479/usr-bin-ld-client-hidden-symbol-dso-handle


If that produces a U __dso_handle output, your libprint.so was built incorrectly (most likely you used ld -shared to link it. Don't do that, use the compiler driver, e.g. g++ -shared ... instead).

编译动态库时使用g++命令,不能使用ld命令直接去链接。

0 0