Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document implementation fftw3.dll and fftw3f.dll #2

Closed
parksj10 opened this issue Nov 29, 2021 · 2 comments
Closed

Document implementation fftw3.dll and fftw3f.dll #2

parksj10 opened this issue Nov 29, 2021 · 2 comments

Comments

@parksj10
Copy link

Hi, sorry for the N00b issue, but I'm having trouble getting the FFTW implementations to work, I've downloaded the dlls and put them in the root directory, and it seems that this code

public static bool LibraryExists()
        {
            try
            {
                var ptr = NativeMethods.fftwf_malloc(8);
                NativeMethods.fftwf_free(ptr);
                return true;
            }
            catch
            {
            }

            return false;
        }

is where the dll is attempting to be found/added, but I can't find any reference in the project how/where to put this dll so it is actually imported and used.

Thanks!
Josh

@wo80
Copy link
Owner

wo80 commented Nov 29, 2021

Make sure that the native FFTW dlls are inside the directory of the executable.

If you are using the Visual Studio solution without any modifications, the output path is defined in fftbench.csproj as <OutDir>$(ProjectDir)..\bin\$(Configuration)</OutDir>, which means the fftbench.exe executable will be in the directory [project root dir]\fftbench\bin\Release (or Debug, if you are compiling in debug mode).

@parksj10
Copy link
Author

ahhhh, just came here to post that I figured out a work around, which is exactly what you said!!! thanks a lot @wo80 for reference for others (to dynamically load the dll)

Soln --> right click --> add --> existing file --> find dll (need to show "All Files")
image

Then make it copy during build
dll --> right click --> properties --> Copy to Output Directory --> Copy or Copy if newer
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants