A lot of Linux beginners can't find the apue.h file mentioned in the article when they study the book "Advanced Programming in Unix Environment". So what should I do? The following small series will introduce you to the solution to the Unix can not find the apue.h file.
when the program is run in this book "unix-level programming environment", the compiler will not prompt apue.h this header file. Apue.h is a header file customized by the author, including the common header files and error handling functions required by the program, so it should be put into the system header file (/usr/include under Linux), so the gcc compiler I can find it.
The solution to this problem is as follows:
1. Download the two files apue.h and error.c corresponding to the book on the Internet;
2. Switch to the root user (the normal user does not have enough permissions to copy files to the /usr directory);
3. Modify the apue.h file. We need to add #endif /* _APUE_H */in the apue.h file. Save the file after #include “error.c”
4. Copy these two files to the /usr/include directory;
For example: cp /home/liupenghui/desktop/apue.h /usr/include/apue.h< Br>
cp /home/liupenghui/Desktop/error.c /usr/include/error.c
5.OK! Now you can run the program in the book.
The above is the introduction of Unix can not find the solution to the apue.h file, in fact, the apue.h file is a header file written by the author himself, can not be found in the system, can be downloaded from the network .
When Linux uses the vi editor, vi is stuck, and this happens frequently. What is the cause of vi car
In Linux terminal operations, sometimes it is necessary to operate on multiple terminals, and switch
If the system hardware performance is insufficient, then when playing games or running other softwar
Linux system operation, awk is a text processing tool, providing a variety of functions, then how to
Ubuntu 12.04 how to install and use Byobu
Ubuntu 12.04 removes the Gnome Shell extension's tips
How to use sudo command to increase permissions under Linux system
How to install VPN in CentOS system
Linux file system entry details
Linux system view wwn number trick
How to modify the character set in Linux
Difference between Linux exit command and _exit command
Knowledge about file I/O operations under Linux
How to solve the problem of Linux system Swap exhaustion
How does Win10 switch the start menu/screen without logging out
MSN 7.5 has a solution for 80048820 error
Win7 always prompts to restart the computer after updating the system.
Win10 preview version 10532 update content Daquan summary
Two funny errors in Windows 7 that are not easy to be found
Win7 system right-click menu how to add "get trustedinstaller permissions" option
Win7 print server installation settings graphic tutorial
How does Win8 log out of the Metro version of QQ? The