I am trying to get a simple project working with FFTW in Visual Studio 2010. I am having trouble linking the library.
I’ve created 64 bit .lib files as directed on their Windows page
I unzipped the 64 bit version of their download and ran the specified tools in that directory. I’ve unzipped it in a folder called “fftw” as a sibling of my project.
In Visual Studio I’ve created a C++ Console App with all the defaults. The default build type is Debug Win32. I’ve added this line to Configuration Properties→Linker:
C:\Users\XXXXX\Documents\Visual Studio 2010\Projects\fftw\libfftw3-3.lib
I’ve also added libfftw3-3.lib to Configuration Properties→Linker→Input and tried a full path there.
I include StdLib complex and FFTW:
#include <complex>
#include "..\..\fftw\fftw3.h"
My main function just has their example code:
int _tmain(int argc, _TCHAR* argv[])
{
const int N = 1024;
fftw_complex in[N], out[N];
fftw_plan p;
p = fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE);
fftw_one(p, in, out);
fftw_destroy_plan(p);
return 0;
}
When I try to build I get this:
1>------ Build started: Project: FFTTest, Configuration: Debug Win32 ------
1> FFTTest.cpp
1>c:\users\XXXXX\documents\visual studio 2010\projects\ffttest\ffttest\ffttest.cpp(34): error C3861: 'fftw_create_plan': identifier not found
1>c:\users\XXXXX\documents\visual studio 2010\projects\ffttest\ffttest\ffttest.cpp(36): error C3861: 'fftw_one': identifier not found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Can someone show me the error in my ways?
Found it:
fftw_create_plan()andfftw_one()are functions that have been removed from FFTW3.You might have got the code from FFTW2 tutorial, see the FFTW3 tutorial instead.