读书人

unix上部署libevent

发布时间: 2013-03-10 09:38:39 作者: rapoo

unix下部署libevent
起初装了libevent,也显示成功了,据同事说。
我去安装的时候同事又没和我说安装过,所以我把他以前解压的包给删掉了。然后就自己安装了,可是总是报这个错


"./compat/sys/_time.h", line 79: warning #2047-D: incompatible redefinition of
macro "timerclear" (declared at line 138 of
"/usr/include/sys/time.h")
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
^

"./compat/sys/_time.h", line 80: warning #2047-D: incompatible redefinition of
macro "timerisset" (declared at line 131 of
"/usr/include/sys/time.h")
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
^

"./compat/sys/_time.h", line 81: warning #2047-D: incompatible redefinition of
macro "timercmp" (declared at line 133 of "/usr/include/sys/time.h")
#define timercmp(tvp, uvp, cmp) \
^

"./compat/sys/_time.h", line 105: warning #2047-D: incompatible redefinition
of macro "timespecclear" (declared at line 157 of
"/usr/include/sys/time.h")
#define timespecclear(tsp) (tsp)->tv_sec = (tsp)->tv_nsec = 0
^

"./compat/sys/_time.h", line 106: warning #2047-D: incompatible redefinition
of macro "timespecisset" (declared at line 159 of
"/usr/include/sys/time.h")
#define timespecisset(tsp) ((tsp)->tv_sec || (tsp)->tv_nsec)
^

"./compat/sys/_time.h", line 107: warning #2047-D: incompatible redefinition
of macro "timespeccmp" (declared at line 148 of
"/usr/include/sys/time.h")
#define timespeccmp(tsp, usp, cmp) \


^

"./compat/sys/_time.h", line 138: error #2101: "itimerval" has already been
declared in the current scope
struct itimerval {
^

"min_heap.h", line 60: warning #2068-D: integer conversion resulted in a
change of sign
void min_heap_elem_init(struct event* e) { e->min_heap_idx = -1; }
^

"min_heap.h", line 79: warning #2068-D: integer conversion resulted in a
change of sign
e->min_heap_idx = -1;
^

"min_heap.h", line 90: warning #2068-D: integer conversion resulted in a
change of sign
e->min_heap_idx = -1;
^

"event.c", line 159: warning #2167-D: argument of type "struct timeval *" is
incompatible with parameter of type "struct timeval *"
return (evutil_gettimeofday(tp, NULL));
^

"event.c", line 700: warning #2167-D: argument of type "struct timeval *" is
incompatible with parameter of type "struct timeval *"
evutil_gettimeofday(&now, NULL);
^

4 errors detected in the compilation of "event.c".
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

然后网上查了好久,都没有这样说的错误。
后来同事和我说他之前已经装成功了,于是我就把以前的给卸载了,用的是find . -name libevent*把里面东西都删了,然后删除压缩包重新安装libevent,但是仍然出现了上面的错误。
真是郁闷,怎么都解决不了。我用的是hp unix的,各位大虾,有谁知道怎么解决的吗?

[解决办法]
unix是高端货, 咱只能玩到linux.

读书人网 >UNIXLINUX

热点推荐