Get the App
SLTechnology News&Howtos  ›  Servers  › 

Ubuntu 12.04 configure apue2 environment

Shulou Source: shulou.com Published: 2022-06-02 17:29:34 09月22日 Update

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

Tags: Directories copies compilations library files recommendations permissions source code examples links static generation environment configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker vpn Redmi macOS Linux