解决问题的方法: g++ epollclient.cpp -o snack -l curses 原因: curses不是C语言默认的库,需要单独的引入; gcc -o app testudp.c -lpthread 就可以解决。