apue初识

一、源码编译经验

  1、源码下载地址:http://www.apuebook.com/

  2、编译步骤:

    1)进入apue源码目录,make时,出现错误提示:“E: Unable to locate package libbsd”

    2)所以需要安装libbsd-dev, 但用apt-get install安装时,提示依赖失败信息,所以改为编译安装

    3)下载libbsd源码, 网址:https://libbsd.freedesktop.org/wiki/

      git命令:git clone https://anongit.freedesktop.org/git/libbsd.git

    4)进入源码包libbsd,安装步骤如下:

      a)./autogen, 会生成configure文件

      b)./configure, 会生成Makefile文件

      c)make

      d)sudo make install, 会把编译好的库文件安装在/usr/local/lib目录下

扫描二维码关注公众号,回复: 9894144 查看本文章

    5)再重新进入apue源码目录,make通过

二、源码学习

  1、fig1.3

    1) Linux下DIR,dirent,stat等结构体详解

    2) what is __dirstream, where can we find the definition

猜你喜欢

转载自www.cnblogs.com/shanyu20/p/12510308.html