I believe many of the Novice "UNIX environment Advanced Programming" friends will encounter a problem, running the inside of the instance (download:http://www.apuebook.com/) when there is a problem, "error: Apue.h: There is no file or directory." Apue.h is a header file that is customized by the author, including commonly used header files and error handling functions required by the program. So the GCC compiler can find it by putting it into the system header file (Linux is/usr/include).
1. Super user privileges Log in Cd/usr/include
2. Copy the apue.h and error.c two files to this directory. (Apue.h is located in Your_apue_path/inlcude; Error.c is located in Your_apue_path/lib)
eg
Cp/home/lucifer/downloads/apue.3e/inlcude/apue.h.
Cp/home/ucfree/apue.3e/lib/error.c. (Implementation of error handling functions in apue.h)
3. Edit Apue.h
On the last line #endif/* _apue_h * * Add a row before #include "error.c"
: Wq save, exit.
Done.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Apue.h header file (Advanced Programming for UNIX environments)