I'm working on adding FFT's to my program. I'm using the fftw3 library, and everything compiles fine, but every time I run the program it crashes, giving me the error:
I was able to circumvent this using the -lm and -lfftw3 commands while compiling directly, but now that I am using makefiles to create my programs I don't know how to link the libraries to the program. My Makefile is very, very long and complicated (600 lines; it's an edited RTXI file), but my Makefile.am looks like this:Code:undefined symbol: fftw_plan_dft_1d
I tried adding -lm -lfftw3 to the LIBS line, and also tried adding the actual library file (/disk/media/fftw-3.2.2/libfftw3.la) to the LIBS line, but I only ever got an -fPIC error (could not read symbols: Bad value).Code:CLEANFILES = moc_*.cpp *~ DISTCLEANFILES = MAINTAINERCLEANFILES = Makefile.in include $(top_srcdir)/Makefile.buildvars pkglib_LTLIBRARIES = data_recorder.la LIBS = $(HDF_LIBS) data_recorder_la_LDFLAGS = -module -avoid-version data_recorder_la_SOURCES = \ data_recorder.h \ data_recorder.cpp nodist_data_recorder_la_SOURCES = \ moc_data_recorder.cpp # MOC Rule - builds meta-object files as needed moc_%.cpp: %.h $(MOC) -o $@ $<
Any help I could get on this would be greatly appreciated!