Last night when I was trying to compile gnumeric to test out the start of command importing, I kept getting the following error:

./.libs/libspreadsheet.so: undefined reference to `go_doc_control_set_doc'

The only place that function is called is in workbook-control.c, which I haven’t changed. Since it’s a function from goffice I figured I’d go recompile goffice and make sure there weren’t any problems there. Turns out there were some issues:

In file included
from /usr/include/glib-2.0/glib/gmacros.h:36,
from /usr/lib/glib-2.0/include/glibconfig.h:9,
from /usr/include/glib-2.0/glib/gtypes.h:30,
from /usr/include/glib-2.0/glib/galloca.h:30,
from /usr/include/glib-2.0/glib.h:30,
from go-file.h:23,
from go-file.c:25:
/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h:152: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’

That’s odd I thought, I’ve never even touched the gcc files, why would that all of a sudden start causing problems? So I took a look at go-file.c and sure enough, my problem was there–I had accidentally typed the letter ‘g’ at the beginning of the file. Oddly enough the compiler sees that as a problem with stddef.h. One freaking letter cost me at least an hour in tracking down problems (frown).