Try moving the last LIBS line before the first. This will lilely cause the linker command to list/scan the fft library before the demo library.