You're not linking with the library. Add "-lfftw" (or something like that) to your linker flags.