DirectFB

This section is similar to the previous section (FLTK and Nano-X) except that DirectFB is now used in place of Nano-X. A regular Linux based workstation is used (running openSUSE 11.3) for the trial. This chapter is based on the post from fatalfeel. DirectFB is not currently available for RTOS such as RTEMS or eCos but works with Linux framebuffer.

I. FLTK / DirectFB:

- FLTK for DirectFB: git clone git://git.directfb.org/git/directfb/ports/FLTK_1.x-DirectFB.git
- DirectFB can be downloaded from [32].

Compiling / installing DirectFB:

export PREFIX=/usr/fltkfb
export LDFLAGS=-L$PREFIX/lib
export CFLAGS="-I$PREFIX/include"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig

./configure --prefix=$PREFIX --enable-static=yes

make
make install -> as root

Compiling / installing FLTK:

export PREFIX=/usr/fltkfb
export LDFLAGS="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib"
export CFLAGS="-I$PREFIX/include"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig

modify FLTK_1.x-DirectFB/FL/xutils.h to adjust the font location:
#define X11_FONT_DIR1
#define X11_FONT_DIR2
#define X11_RGBTXT

./configure --prefix=$PREFIX --enable-directfb=yes --disable-gl --with-archflags="-I$PREFIX/include/directfb"

make
make install -> as root


Before trying FLTK, it is possible to test DirectFB standalone with the examples supplied from here. To run the examples, you might require root privilege.

To compile the template from the section (FLTK and Nano-X), paragraph 3, adjust the PATH variable to include FLTK configuration tool and use fltk-config to compile the application:

PATH=/user/fltkfb/bin/:$PATH ; export PATH
fltk-config --compile gui_template.cpp