views:

421

answers:

1

I'm trying to get the Fastest Fourier Transform in the West to cooperate with eclipse. I downloaded it from the website (it's a big folder called fftw-3.2.2 filled with other folders with names api, dft, cell, doc, kernel, fdft and more, each filled with .h and .c files).

I've tried going to project>Properties>MinGW C linker>Libraries>Library Search Path (-L) and adding the folder fftw-3.2.2. I try to put #include or #include at the top of my code.

I can put in a line like 'fftw_plan p ;' and it's fine with it, but whenever I try to use one of the fourier transform functions, like 'fftw_execute(p);' , it gives me the message 'undefined reference to fftw_ececute'. the project refuses to build and run, and i'm stuck.

I've looked around here and other places, and everything keeps telling me about libX.a files, but the fftw-3.2.2 doesn't contain any files with the .a extension. How can I get eclipse to work with fftw? I am running eclipse ganymede 3.4.1 on a windows xp machine with the mingw compiler.

A: 

Did you download the binaries linked here?

Assuming you did, when you compile, you need to link against the libraries that are provided. These probably have a .dll extension, and may be found in a lib or bin directory, or similar. You might want to check if the file you download has a readme that tells you how to use it.

To link against the libraries, you first need to specify that path as the linker path, which it sounds like you've done already, and then you need to add the specific libraries you're using to the list of link libraries. Here is a screenshot taken from this page that shows how this is done. Basically, you go to the project properties, then find the "C/C++ Build" section, then on the "Tool Settings" tab, you add the names of the library files, WITHOUT the extension. The compiler will search the Library search paths for those libraries (not recursively).

notJim