I'm pretty new to Math Kernel Library, and I've faced a problem in compiling a very simple FFT operation on one dimension of a matrix. I know that the problem is about linking and it's not special to mkl.
MKL_Complex16 a[4];
MKL_Complex16 a_fft[4];
DFTI_DESCRIPTOR_HANDLE dft_descriptor_handle_kx;
MKL_LONG status_kx, l;
l=4;
status_kx = DftiCreateDescriptor(&dft_descriptor_handle_kx, DFTI_DOUBLE, DFTI_COMPLEX, 1, l);
status_kx = DftiSetValue(dft_descriptor_handle_kx, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
status_kx = DftiCommitDescriptor(dft_descriptor_handle_kx);
status_kx = DftiComputeBackward(dft_descriptor_handle_kx, a, a_fft);
status_kx = DftiFreeDescriptor(&dft_descriptor_handle_kx);
and I receive this error messages:
/tmp/icpcxXraKo.o: In function `main':
testing.cpp:(.text+0x47): undefined reference to `DftiCreateDescriptor_d_1d'
testing.cpp:(.text+0x60): undefined reference to `DftiSetValue'
testing.cpp:(.text+0x6d): undefined reference to `DftiCommitDescriptor'
testing.cpp:(.text+0x85): undefined reference to `DftiComputeBackward'
testing.cpp:(.text+0x92): undefined reference to `DftiFreeDescriptor'
I would be so glad if you help me with this issue.