In the entire book, APUE has such an include "apue. h" pre-processing statement ~ For the source code and related downloads, refer to ghost ~ There are also some constants and function declarations (which I don't know yet). error. c defines several error processing functions, which seem to be specific to run the AP in Linux.
In the entire book, APUE has such an include "apue. h" pre-processing statement ~
Source Code and related download see: http://www.linuxidc.com/Linux/2011-04/34662.htm
Then, some other. H files are included in the apue file ~ There are also some constants and function declarations (I don't know why)
Several error processing functions are defined in error. c.
Specifically, you need to run the code in APUE in Linux:
1. decompress the downloaded code to generate an apue.2e folder.
2. Copy the apue. h and error. c files to/usr/include.
3. Open apue. h and add include "error. c" at the end"
I solve this problem now. I compiled and ran several pieces of code in the book ~