Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I have a very simple question regarding the use of external library in Qt, and in particular FFTW.
I am working on a project in whice I need to build a GUI. I am working with Qt creator for the first time and am a pretty novice porgrammer.
I need to preform fft in my program and I have found that
FFTW library
is very useful for that matter.
How I can make use of the library in Qt?
I know It porbably have nothing to do with the program and more with the C++ language and compiling and linking, but I am basicly in the dark on this subject.
I failed to find a detailed enough answer and can make progress on my project without the use of this library. please help.
–
When you want to use an external library in c/c++ first of all you will have to find one ore more *.h files that should have been shipped with the library, .h files describe to the compiler what will be found inside the library.
You will have to #include the correct .h file in your code and tell the compiler where to find it (in which folder).
in your case you should have a line at the top of your program
#include <fftw3.h>
Adding this linr in you .pro file will help the compiler finding where your .h file is.
INCLUDEPATH += "C:/fftwMinGW"
Then you will have to specify to the compiler where the library can be found and what's its name.
You do that by adding a line into you .pro file (the project file) that you find at the top of thr tree of your project on the left side in Qt creator.
The line to add to the pro file is the following.
LIBS''= -lfftw3
–
–
–
–
–