Advanced Programming in Unix environment-"apue. h" configuration
The book is not much said. It is called the Bible for C Programming in Unix. However, it seems that some people in China like to recommend books to others now. I doubt if some people have read every book recommended. I am not recommended for the moment, because I have not finished reading it.
Almost all the code in this book uses the author's programming header file: apue. h, but this is not the built-in iso c, so you need to configure it.
The book I used is the third, the third, and the third. The important things of the third are described three times. 1. Go to the official website of the book and download the source code. 2: extract the package 3: make.
In fact, after decompression, you will find that the directory contains a README file to open:
Read the file called DISCLAIMER.On Freebsd, type "gmake".On other platforms, type "make" (as long as this is gnu make).For FAQs, updated source code, and the lost chapter, see http://www.apuebook.com.Please direct questions, suggestions, and bug reports to sar@apuebook.com.Steve RagoJanuary 2013
The author has already told you how to do it.
4: Copy two files
These two files are: apue. h error. c files are located separately (take my computer as an example)
/home/mark/Downloads/apu.3e/include /* apue.h *//home/mark/Downloads/apu.3e/lib /* error.c */
Copy them to the default working directory of C language (take my computer as an example)
cp ./include/apue.h ./lib/error.c /usr/include
5: add a line of code before the last line of the apue. h header file:
#include "erro.c"
The final effect is as follows:
#include "error.c"#endif /* _APUE_H */
Above