0) set up scratchbox (
http://scratchbox.org/) cs2007q3-glibc2.5-arm6 compiler.
1) ssh into your kindle. (requires usbnetwork)
2) tar the libraries on your kindle.
# cd /mnt/us
# tar cf libs.tar /usr/lib
3) scp the /mnt/usr/libs.tar into scratchbox.
4) extract the libraries into scratchbox.
# cd /
# tar xf libs.tar
5) download the attached file and extract it into scratchbox.
6) compile main.c in scratchbox.
# gcc main.c -Iusr/include -Iusr/include/directfb -ldirectfb -lfreetype
7) scp a.out onto your kindle.
8) ssh into your kindle and run a.out.
tested on a kindle 3g (v3.1).
==fortune cookie==
confuscious say:
good programmer have bad vision.
only see what right in front him.