技术开发 频道

DirectFB 之一:PC平台编译与安装

  10. 总结

  1)DirectFB 支持非Framebuffer模式,不使用 Framebuffer 也可以使用 DirectFB.

  2) 一定要记得添加 /usr/local/bin 到 /etc/ld.so.conf.d/ 里。一开始忘了,出现了一下错误:

  错误A:编译示例程序的时候

  ......

  checking for pkg-config... /usr/bin/pkg-config

  checking pkg-config is at least version 0.9.0... yes

  checking for DIRECTFB... no

  configure: error: Requested 'directfb >= 1.2.0' but version of DirectFB is 1.0.1

  *** DirectFB 1.2.0 or newer is required. The latest version

  *** of DirectFB is available from http://www.directfb.org/.

  make: *** No targets specified and no makefile found. Stop.

  关于 pkg-config 命令是如何工作的,参考 pkg-config工具.

  错误B: 运行的时候

  # sudo ./df_andi

  ./df_andi: error while loading shared libraries: libdirectfb-1.3.so.0: cannot open shared object file: No such file or directory

  # ldd df_andi

  linux-gate.so.1 => (0x0075e000)

  libdirectfb-1.3.so.0 => not found

  libfusion-1.3.so.0 => not found

  libdirect-1.3.so.0 => not found

  libpthread.so.0 => /lib/i686/nosegneg/libpthread.so.0 (0x0036d000)

  libc.so.6 => /lib/i686/nosegneg/libc.so.6 (0x001f9000)

  /lib/ld-linux.so.2 (0x001d7000)

  #! /bin/sh

  #

  # Build DirectFB library for PC

  #

  # ChangeLog:

  # V0.1 2009/03/15 Zeng Xianwei (xianweizeng@gmail.com)

  #

  prefix=/usr/local

  def_options="--prefix=${prefix}"

  fatal(){

  echo "Error: $@"

  exit 1

  }

  build_and_install(){

  ./autogen.sh \

  ${def_options} \

  --disable-osx \

  --enable-x11 \

  --disable-fbdev \

  --disable-sdl \

  --disable-vnc \

  --with-gfxdrivers=none \

  --with-inputdrivers=linuxinput \

  --enable-multi \

  --enable-debug

  make || fatal "make failed"

  sudo make install || fatal "make install failed"

  }

  build_and_install

  exit 0

0
相关文章