当前位置: 技术问答>linux和unix
Redhat9.0下的新问题?
来源: 互联网 发布时间:2015-07-08
本文导语: 程序源码在:http://liuliu.512j.com/tmp/upload/manager.rar 问题在:我这个程序在Redhat7.x的version下没有问题,但是在redhat9.0 下问题却出来了,请问高手们,如果解决呢?我make后的错误提示如下: cc -o message message.o -L../common tool.a /u...
程序源码在:http://liuliu.512j.com/tmp/upload/manager.rar
问题在:我这个程序在Redhat7.x的version下没有问题,但是在redhat9.0
下问题却出来了,请问高手们,如果解决呢?我make后的错误提示如下:
cc -o message message.o -L../common tool.a /usr/lib/libpthread.a -LYBASE
/usr/lib/libpthread.a(ptw-write.o)(.text+0x25): In function `write':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-write.o)(.text+0x55): In function `write':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-close.o)(.text+0x1f): In function `close':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-close.o)(.text+0x4a): In function `close':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-connect.o)(.text+0x22): In function `__connect':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-connect.o)(.text+0x51): more undefined references to `__syscall_error' fol
low
/usr/lib/libpthread.a(pthread.o)(.text+0x30b): In function `__pthread_initialize_manager':
: undefined reference to `_res'
/usr/lib/libpthread.a(pthread.o)(.text+0xacf): In function `__pthread_reset_main_thread':
: undefined reference to `_errno'
/usr/lib/libpthread.a(pthread.o)(.text+0xadf): In function `__pthread_reset_main_thread':
: undefined reference to `_h_errno'
/usr/lib/libpthread.a(pthread.o)(.text+0xae9): In function `__pthread_reset_main_thread':
: undefined reference to `_res'
/usr/lib/libpthread.a(pthread.o)(.text+0xc6a): In function `__pthread_kill_other_threads_np':
: undefined reference to `_errno'
/usr/lib/libpthread.a(pthread.o)(.text+0xc7a): In function `__pthread_kill_other_threads_np':
: undefined reference to `_h_errno'
/usr/lib/libpthread.a(pthread.o)(.text+0xc84): In function `__pthread_kill_other_threads_np':
: undefined reference to `_res'
/usr/lib/libpthread.a(pthread.o)(.text+0x111d): In function `pthread_initialize':
: undefined reference to `_res'
/usr/lib/libpthread.a(pthread.o)(.data+0x1b8): undefined reference to `_errno'
/usr/lib/libpthread.a(pthread.o)(.data+0x1c0): undefined reference to `_h_errno'
/usr/lib/libpthread.a(pthread.o)(.data+0x1c8): undefined reference to `_res'
/usr/lib/libpthread.a(ptw-read.o)(.text+0x25): In function `read':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-read.o)(.text+0x55): In function `read':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-nanosleep.o)(.text+0x23): In function `nanosleep':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-nanosleep.o)(.text+0x51): In function `nanosleep':
: undefined reference to `__syscall_error'
collect2: ld returned 1 exit status
make: *** [message] Error 1
问题在:我这个程序在Redhat7.x的version下没有问题,但是在redhat9.0
下问题却出来了,请问高手们,如果解决呢?我make后的错误提示如下:
cc -o message message.o -L../common tool.a /usr/lib/libpthread.a -LYBASE
/usr/lib/libpthread.a(ptw-write.o)(.text+0x25): In function `write':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-write.o)(.text+0x55): In function `write':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-close.o)(.text+0x1f): In function `close':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-close.o)(.text+0x4a): In function `close':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-connect.o)(.text+0x22): In function `__connect':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-connect.o)(.text+0x51): more undefined references to `__syscall_error' fol
low
/usr/lib/libpthread.a(pthread.o)(.text+0x30b): In function `__pthread_initialize_manager':
: undefined reference to `_res'
/usr/lib/libpthread.a(pthread.o)(.text+0xacf): In function `__pthread_reset_main_thread':
: undefined reference to `_errno'
/usr/lib/libpthread.a(pthread.o)(.text+0xadf): In function `__pthread_reset_main_thread':
: undefined reference to `_h_errno'
/usr/lib/libpthread.a(pthread.o)(.text+0xae9): In function `__pthread_reset_main_thread':
: undefined reference to `_res'
/usr/lib/libpthread.a(pthread.o)(.text+0xc6a): In function `__pthread_kill_other_threads_np':
: undefined reference to `_errno'
/usr/lib/libpthread.a(pthread.o)(.text+0xc7a): In function `__pthread_kill_other_threads_np':
: undefined reference to `_h_errno'
/usr/lib/libpthread.a(pthread.o)(.text+0xc84): In function `__pthread_kill_other_threads_np':
: undefined reference to `_res'
/usr/lib/libpthread.a(pthread.o)(.text+0x111d): In function `pthread_initialize':
: undefined reference to `_res'
/usr/lib/libpthread.a(pthread.o)(.data+0x1b8): undefined reference to `_errno'
/usr/lib/libpthread.a(pthread.o)(.data+0x1c0): undefined reference to `_h_errno'
/usr/lib/libpthread.a(pthread.o)(.data+0x1c8): undefined reference to `_res'
/usr/lib/libpthread.a(ptw-read.o)(.text+0x25): In function `read':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-read.o)(.text+0x55): In function `read':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-nanosleep.o)(.text+0x23): In function `nanosleep':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-nanosleep.o)(.text+0x51): In function `nanosleep':
: undefined reference to `__syscall_error'
collect2: ld returned 1 exit status
make: *** [message] Error 1
|
加上 -lpthread 试下
|
加个-lc看看?