I\'m trying to compile something that depends on gtkspell, which
depends on enchant, under MinGW. I\'m getting errors like
gtkspell/gtkspell.c:757: undefined reference
The way to fix my minimal example is to add --libs
after --cflags
; gcc couldn't find the library to link against.
I was able to fix the problem that I was running in to with the more complicated code that I was originally trying to compile (gummi (http://dev.midnightcoding.org/projects/gummi)) by passing LDFLAGS="$(pkg-config --cflags --libs gtkspell-2.0 enchant)" CFLAGS="$(pkg-config --cflags --libs gtkspell-2.0 enchant)"
to the configure script; the problem seems to have been that the arguments to gcc were passed in the wrong order, and it couldn't find enchant when it was trying to link gtkspell.