Incorrect Use and solution of apue with Book source code
Source: Internet
Author: User
Use and solution of apue with Book Source Code errors-Linux general technology-Linux programming and kernel information. The following is a detailed description. Author: Xiaogang
1. In Windows, directly use 7-zipzips to decompress src.tar.gz into apue.2e, and then use crt to transmit it to the test machine. In the result, all source fig files (c) are of zero size and empty files?
Later, I tried to upload src.tar.gz to the linux environment, and then tar-xzvf src.tar.gz. I found that all files starting with fig are soft connections. If I decompress the file in windows, I will discard this soft connection.
2. In the decompressed apue.2e/folder, modify
A. modify "Make. defines. linux" WKDIR =/home/var/apue.2e to the absolute path of apue.2e in the current environment (including apue.2e itself)
B. Modify linux. mk IN THE apue.2e/std directory. Change all nawk to awk.
3. Randomly compile a link to fig3.2 with the error: "fig3.2: file not recognized: File format not recognized
Collect2: ld returned 1 exit status"
If the file is not recognized, use the file/hole. c of the soft connection in fig3.2 to eliminate the error.
4. Local libraries used for compiling links:
Gcc-I/data/compiler/g_platform/bradenwu/apue.2e/include/-L/data/compiler/g_platform/bradenwu/apue.2e/lib/file/hole. c/data/compiler/g_platform/bradenwu/apue.2e/lib/libapue. a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service