dbfopen.c (not used here) et shpopen.c are files from a shapelib I've found at http://shapelib.maptools.org/
I use libgeos-3.0.0 and the last (?) stable version of the Gnome library.

To build the executable on my laptop (Ubuntu 8.04), I use :
gcc `pkg-config --cflags --libs glib-2.0` -o <exe_name>  *.c -lgeos_c -lstdc++ -lm

The syntax is: <exe_name> shape[.shp]
The program writes on standard output the intersections in the WKT format.
