- 论坛徽章:
- 0
|
我在SCO5.0.7(已经装了mp3和FSUpthread 3.5c)下编译一个简单的测试程序(linux 下正常),编译命令如下:gcc pthtest.c -o pthtest -lgthreads,结果报告如下错误:
In file included from /usr/include/pthread.h:40,
from pthtest.c:4:
/usr/include/pthread/signal.h:101: redefinition of `struct timespec'
In file included from pthtest.c:4:
/usr/include/pthread.h:177: conflicting types for `pthread_mutex_t'
/usr/include/sys/types.h:432: previous declaration of `pthread_mutex_t'
/usr/include/pthread.h:185: conflicting types for `pthread_mutexattr_t'
/usr/include/sys/types.h:386: previous declaration of `pthread_mutexattr_t'
/usr/include/pthread.h:240: conflicting types for `pthread_once_t'
/usr/include/sys/types.h:500: previous declaration of `pthread_once_t'
/usr/include/pthread.h:252: conflicting types for `pthread_cond_t'
/usr/include/sys/types.h:460: previous declaration of `pthread_cond_t'
/usr/include/pthread.h:256: conflicting types for `pthread_condattr_t'
/usr/include/sys/types.h:380: previous declaration of `pthread_condattr_t'
/usr/include/pthread.h:310: conflicting types for `pthread_attr_t'
/usr/include/sys/types.h:375: previous declaration of `pthread_attr_t'
/usr/include/pthread.h:320: conflicting types for `pthread_key_t'
/usr/include/sys/types.h:493: previous declaration of `pthread_key_t'
/usr/include/pthread.h:386: conflicting types for `pthread_t'
/usr/include/sys/types.h:247: previous declaration of `pthread_t'
大概是说sys/types.h 与pthread.h的定义重复,结果郁闷了好几天都解决不了,请诸位高人帮帮忙,小弟感激不尽  |
|