求救,关于RH9下的库链接问题
现在我在RH9下用gcc编译任何程序都会出现如下信息,.o文件可以生成,但是无法生成可执行文件,求救!/lib/libc.so.6: undefined reference to `_dl_lookup_versioned_symbol_skip@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_lookup_versioned_symbol@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_start_profile@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_check_map_versions@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__libc_enable_secure@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_get_origin@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_dst_substitute@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_debug_state@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_init@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_dst_count@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_signal_error@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_debug_printf@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_map_object_deps@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_unload_cache@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_relocate_object@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_tls_symaddr@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_argv@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_catch_error@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_lookup_symbol_skip@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_lookup_symbol@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_map_object@GLIBC_PRIVATE' gcc -v列出详细信息帮助定位.
该问题可能是gcc驱动的ld找不到ld-linux.so.x/ld-x.x.x.so引起
可以
-rpath=路径(ld-linux.so.x所在)
或者ld-linux.so.x cp到某gcc公认路径下 太冲动了,已经重装了
不过还是谢谢你的回复,下次出了这样的问题可以试试你说的方法^_^
页:
[1]