Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ubuntu 12.04 configure apue2 environment

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

0. For ease of operation, it is recommended to use root permission.

1. Here http://www.apuebook.com/src.tar.gz downloads the source package and decompresses it to a directory, such as / root/apue.2e.

# tar-zxvf apue.tar.gz-C / root/

2. Change line 6 WKDIR=/home/sar/apue.2e in / root/apue.2e/Make.defines.linux to / root/apue.2e. (corresponding to the decompressed directory in 1)

3. Replace the status in line 122 in / root/apue.2e/ipp/ipp.h with Status. (it can also be replaced by something else, but it should correspond to the following 4)

4. Replace status in line 977 of / root/apue.2e/ipp/printd.c with Status. (corresponding to the above 3)

5. Replace the first line # include in / root/apue.2e/threadctl/getenv1.c and / root/apue.2e/threadctl/getenv3.c with # include.

6. Execute make. If the compilation is successful, the libapue.a static link library file is generated in the / root/apue.2e/lib/ directory.

7. Copy / root/apue.2e/lib/libapue.a to the / usr/local/lib/ directory.

# cp / root/apue.2e/lib/libapue.a / usr/local/lib/

8. Copy / root/apue.2e/include/apue.h to / usr/local/include/ directory.

# cp / root/apue.2e/include/apue.h / usr/local/include/

9. Compilation example: gcc main.c-lapue.

OVER

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report