Advanced Programming in Unix environment-"apue. h" configuration, unixapue. h
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 a header file programmed by the author:apue.h
But this is not included 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
The two files are:apue.h error.c
The two 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: In
apue.h
Add a line of code before the last line of the header file:
The final effect is as follows:
#include "error.c"#endif /* _APUE_H */
Above
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.