Here is what I did trying to install and use FFTW in Visual Studio 2017 on my 64 bit machine:
Opened the Developer Command Prompt for VS 2017, navigated to the unzipped folder containing the fftw files and ran lib /def:libfftw3-3.lib
In Project>fftw_helloworld Properties>C/C++>General>Additional Include Directories, I added the folder containing the fftw files. I did the same in Project>fftw_helloworld Properties>Linker>General>Additional Library Directories. In Project>fftw_helloworld Properties>Linker>Input>Additional Dependencies, I added libfftw3-3.lib.
I ran this code:
#include "pch.h"
#include <fftw3.h>
int main()
{
fftw_complex *in, *out;
fftw_plan p;
int N = 32;
in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * N);
out = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * N);
p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
fftw_execute(p); /* repeat as needed */
fftw_destroy_plan(p);
fftw_free(in); fftw_free(out);
return 0;
}
I got the system error "The code execution cannot proceed because libfftw3-3.dll was not found. Reinstalling the program may fix this problem". I closed VS, reopened the project, cleaned it, and rebuilt it to no luck.
After searching on Stack Exchange, I saw a potential solution was to add libfftw3-3.dll into the folder containing fftw_helloworld.exe, I did so and the error changed to "The application was unable to start correctly (0xc000007b). Click OK to close the application."
I'm stuck here, I have no idea how to fix this and I need FFTW to continue.
I had the same problem. Go to properties -> Build Events -> Post-Build Event -> Command Line and add this command: xcopy /d /y "$path to your .dll files*.*" "$(TargetDir)"
User contributions licensed under CC BY-SA 3.0