LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1155|回复: 2

问个epoll.h的问题,明明在epoll.h 头文件中预定义了的,怎么就出错了?epoll_ctl()

[复制链接]
发表于 2005-10-30 23:43:11 | 显示全部楼层 |阅读模式
make[2]: Entering directory `/tmp/BitStormLite-0.1b/src'
g++ `pkg-config --cflags gtk+-2.0` -g -O2  -o bitstormlite -lpthread `curl-config --libs` `pkg-config --libs gtk+-2.0` bdict.o BitSet.o blist.o BTTask.o EpollReactor.o LiteWindow.o main.o PeerAcceptor.o PeerLink.o PeerManager.o PieceRequest.o sha.o Socket.o Storage.o TCPTracker.o UDPTracker.o ThreadMutex.o TorrentFile.o TrackerManager.o  
EpollReactor.o(.text+0x3fb): In function `CEpollReactor::addSocket(ISocket*)':
/tmp/BitStormLite-0.1b/src/EpollReactor.cpp:58: undefined reference to `epoll_ctl'
EpollReactor.o(.text+0x43f): In function `CEpollReactor::removeSocket(ISocket*)':
/tmp/BitStormLite-0.1b/src/EpollReactor.cpp:64: undefined reference to `epoll_ctl'
EpollReactor.o(.text+0x468): In function `CEpollReactor::start()':
/tmp/BitStormLite-0.1b/src/EpollReactor.cpp:73: undefined reference to `epoll_create'
EpollReactor.o(.text+0x571): In function `CEpollReactor::svc()':
/tmp/BitStormLite-0.1b/src/EpollReactor.cpp:114: undefined reference to `epoll_wait'
EpollReactor.o(.text+0x67b): In function `CEpollReactor::updateMask(ISocket*)':
/tmp/BitStormLite-0.1b/src/EpollReactor.cpp:190: undefined reference to `epoll_ctl'
collect2: ld returned 1 exit status
make[2]: *** [bitstormlite] Error 1
make[2]: Leaving directory `/tmp/BitStormLite-0.1b/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/BitStormLite-0.1b'


gcc -v
gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/specs
Configured with: ../gcc-3.3.1/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
Thread model: posix
gcc version 3.3.1


/lib/libc.so.6
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.1.
Compiled on a Linux 2.4.22 system on 2004-10-08.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        linuxthreads-0.10 by Xavier Leroy
        BIND-8.2.3-T5B
        libthread_db work sponsored by Alpha Processor Inc
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Report bugs using the `glibcbug' script to <bugs@gnu.org>.

cat /usr/include/linux/version.h

#define UTS_RELEASE "2.6.13.1"
#define LINUX_VERSION_CODE 132621
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
shizhu@pink:/tmp/BitStormLite-0.1b$


系统 LFS 5.0  内核:2.6.13.1
各位大虾帮忙看看吧。或者说说替代办法
发表于 2005-10-31 08:34:32 | 显示全部楼层
epoll_ctl() 我记忆中只是一个空函数,只是定义了一下
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-31 10:12:02 | 显示全部楼层
确实如此。。我看了,没有找到它的实现部分。应该是和GLIBC相关的。。
听说这个epoll的五个函数可以用select()来替换,不知道怎么换了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表