配置好動態連接庫或者靜態連接庫
html
1,下載UNIX網絡編程書的頭文件及示例源碼unpv13epython
2 按照readme來編譯編程
Execute the following from the src/ directory:網絡
./configure # try to figure out all implementation differencesapp
cd lib # build the basic library that all programs needtcp
make # use "gmake" everywhere on BSD/OS systemsoop
cd ../libfree # continue building the basic libraryui
makespa
3. 這個時候能夠按照readme裏提到的方法編譯運行該源文件裏的代碼.net
cd ../intro # build and test a basic client program
make daytimetcpcli
./daytimetcpcli 127.0.0.1
可是若是想在任何位置均可以編譯unix網絡編程的程序, 或者說使用unp.h頭文件
4,將生成的libunp.a靜態庫複製到/usr/lib/和/usr/lib64/中。
5,修改unp.h並將其和config.h拷貝到/usr/include中,爲了之後include方便