搭建《UNIX网络编程》那本书所需的环境
1.ubuntu18系统安装编译器,build-essential
sudo apt-get install build-essential
2.下载书中的头文件以及实例源码:http://www.unpbook.com/src.html
3.解压下载的unpv13e.tar.gz 进行一波骚气操作
tar -xzvf unpv13e.tar.gz
chmod u+x configure
./configure
cd lib
make
cd ../libfree # continue building the basic library
make
cd ../libgai # the getaddrinfo() and getnameinfo() functions
make
当出现如下错误
gcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o inet_ntop.o inet_ntop.c
inet_ntop.c: In function ‘inet_ntop’:
inet_ntop.c:60:9: error: argument ‘size’ doesn’t mat