Skip to content

y-c/APUE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

APUE

Notes and code from APUE (Advanced Programming in the Unix Environment, 2nd Edition).

The book can be found here.

Source code can be found here.

Code Layout

/APUE/apue.2e (compiled source code)

/APUE/chx (my notes for chapter x)

How to compile

I have compiled the source code on MAC. Suppose you just obtain the source code, then follow the [instrctions] (https://github.com/y-c/APUE/blob/master/apue.2e/README) to compile. If you are using MAC and it complains:

Undefined symbols for architecture x86\_64:
  "_CMSG_LEN", referenced from:
        _recv_fd in libapue.a(recvfd.o)
        ld: symbol(s) not found for architecture x86_64
        clang: error: linker command failed with exit code 1 (use -v to see invocation) 

Simply adding -D\_DARWIN\_C\_SOURCE into Make.defines.macos will resolve the issue.

How to run your own code

Suppose you have written your own file.c in the folder APUE/ch1, go to the folder and

gcc -o a file.c -L. ../apue.2e/lib/libapue.a

About

Advanced Programming in the Unix Environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published