APUE配置

1.Download the source http://www.apuebook.com/sourcecode.html

2.Modify the Make.defines.linux

3.Then, "make" it!

 

If you don't have "stropts.h" that might be a little complicated. Firstly, you type:

1 yum install git-core
2 git clone git://sourceware.org/git/glibc.git
3 cp glibc/streams/stropts.h /usr/include
4 cp glibc/bits/stropts.h /usr/include/bits/
5 cp glibc/sysdeps/x86_64/bits/xtitypes.h /usr/include/bits/


If it says "nawk" not found, you just need to:

1 vim ./std/linux.mk
2 :%s/nawk/awk/gc

 

If it says "ARG_MAX" not defined, you just need to:

 

      add #define ARG_MAX 4096 in the apue.h
    add #include in threadctl/getenv1.c 

    and threadctl/getenv3.c

normally, that's all you might encounter.

 
after you've "make" it, don't forget move "apue.h" and "libapue.a" to /usr/local/include and /usr/local/lib
 
And now, congratulations! Everything is DONE!




posted on 2012-01-25 18:17  le23  阅读(155)  评论(0)    收藏  举报

导航