Thread: Re: [Dev-C++] Problems with linking FFTW library
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Teboho N. <TNy...@cs...> - 2004-10-21 09:33:00
|
Hi Siva, I am still getting the same errors even with fftw-2.1.5. version. c:\dev-c++\examples\fft\fft.o(.text+0x29):fft.cpp: undefined reference to `fftw_malloc' c:\dev-c++\examples\fft\fft.o(.text+0x42):fft.cpp: undefined reference to `fftw_malloc' c:\dev-c++\examples\fft\fft.o(.text+0x58):fft.cpp: undefined reference to `fftw_create_plan' c:\dev-c++\examples\fft\fft.o(.text+0x74):fft.cpp: undefined reference to `fftw_one' c:\dev-c++\examples\fft\fft.o(.text+0x83):fft.cpp: undefined reference to `fftw_destroy_plan' c:\dev-c++\examples\fft\fft.o(.text+0x92):fft.cpp: undefined reference to `fftw_free' c:\dev-c++\examples\fft\fft.o(.text+0xa1):fft.cpp: undefined reference to `fftw_free' thanks in advance Teboho >>> Siva Chandra <siv...@ya...> 20/10/2004 09:54:19 >>> Hello, There is a Dev-Pak now available for fftw at http://www.devpaks.org/ (it is listed under the mathematics section there). You may try using it. But It is for an older version fftw-2.1.5. HTH, Siva Chandra _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. |
From: Teboho N. <TNy...@cs...> - 2004-10-21 14:28:50
|
Hi, I have included the example code from FFTW 3.01 tuturial. I just replaced fft_plan_dft_1d( ) and fftw_excute( ) with fftw_create_plan and fftw_one when using the binaries from FFTW 2.1.5. I also replace the header file fftw3.h with the ones shown below. When using FFTW 3.01 binaries I add the fftw3.lib file via the menu project-> object file or linker options in the Dev-C++. When using the FFTW 2.1.5 binaries, I add the libfftw.* files to the lib folder. It still doesn't work with this changes. #include <stdlib.h> #include <fftw.h> #include <rfftw.h> int main() { int N = 256; fftw_complex *in, *out; fftw_plan p; in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * N); out = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * N); p = fftw_create_plan(N,FFTW_FORWARD,FFTW_ESTIMATE); fftw_one(p,in,out); //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); system("PAUSE"); return 0; } thanks again Teboho >>> Cary Haynie <xen...@gm...> 21/10/2004 15:11:55 >>> Those errors look would suggest that your missing a header file or something. I dont know what headers that fftw uses, but thats where I would start. Also make sure that that there is a 'using namespace <name>;' statement, if one is required. On Thu, 21 Oct 2004 11:31:13 +0200, Teboho Nyareli <tny...@cs...> wrote: > Hi Siva, > I am still getting the same errors even with fftw-2.1.5. version. > > c:\dev-c++\examples\fft\fft.o(.text+0x29):fft.cpp: undefined reference > to `fftw_malloc' > c:\dev-c++\examples\fft\fft.o(.text+0x42):fft.cpp: undefined reference > to `fftw_malloc' > c:\dev-c++\examples\fft\fft.o(.text+0x58):fft.cpp: undefined reference > to `fftw_create_plan' > c:\dev-c++\examples\fft\fft.o(.text+0x74):fft.cpp: undefined reference > to `fftw_one' > c:\dev-c++\examples\fft\fft.o(.text+0x83):fft.cpp: undefined reference > to `fftw_destroy_plan' > c:\dev-c++\examples\fft\fft.o(.text+0x92):fft.cpp: undefined reference > to `fftw_free' > c:\dev-c++\examples\fft\fft.o(.text+0xa1):fft.cpp: undefined reference > to `fftw_free' > > > thanks in advance > Teboho > > >>> Siva Chandra <siv...@ya...> 20/10/2004 09:54:19 >>> > > > > Hello, > > There is a Dev-Pak now available for fftw at > http://www.devpaks.org/ (it is listed under the > mathematics section there). > > You may try using it. But It is for an older version > fftw-2.1.5. > > HTH, > Siva Chandra > > _______________________________ > Do you Yahoo!? > Declare Yourself - Register online to vote today! > http://vote.yahoo.com > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on > ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give > us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > MailScanner thanks transtec Computers for their support. > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. |
From: <wa...@wa...> - 2004-10-21 17:26:36
|
On 21 Oct 2004 at 16:25, Teboho Nyareli wrote: > When using FFTW > 3.01 binaries I add the fftw3.lib file via the menu project-> object > file or linker options in the Dev-C++. .lib? I believe that's your problem. You should be linking a .a file not a .lib file. Watson (the pencil neck) Davis |
From: Teboho N. <TNy...@cs...> - 2004-10-22 06:30:14
|
Hi Watson, FFTW 3.01 ( fftw-3.0.1-w32-pl1 )comes with following files: fftw3.dll fftw3.exp fftw3.h fftw3.lib fftw.map I linked fftw3.lib in the project options. When using FFTW 2.1.5, I add the following files to the lib folder: libfftw.a libfftw.la librfftw.a librfftw.la There might be something I am missing. Please help. regards Teboho >>> <wa...@wa...> 21/10/2004 19:26:34 >>> On 21 Oct 2004 at 16:25, Teboho Nyareli wrote: > When using FFTW > 3.01 binaries I add the fftw3.lib file via the menu project-> object > file or linker options in the Dev-C++. .lib? I believe that's your problem. You should be linking a .a file not a .lib file. Watson (the pencil neck) Davis ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. |
From: <wa...@wa...> - 2004-10-22 06:49:13
|
I have not used the FFTW libraries and I don't have them installed and I don't have time right now to download them and write something to test them. But as I said, the FFTW 3.01 files look like they're set up for Visual C++. The hint is in the way the library is named. With Dev C++/mingw, the format for the library is lib<library name>.a Take a look at the FFTW 2.1.5 filenames, they follow this convention. I would not expect the fftw3.lib file to link properly. It's almost definitely in the wrong format. I think you're stuck with using FFTW 2.1.5 until someone comes out with a FFTW 3.0.1 Dev Pack for Dev C++/MinGW... unless you pick up another compiler. Sorry. Watson (the pencil neck) Davis On 22 Oct 2004 at 8:26, Teboho Nyareli wrote: > Hi Watson, > FFTW 3.01 ( fftw-3.0.1-w32-pl1 )comes with following files: > fftw3.dll > fftw3.exp > fftw3.h > fftw3.lib > fftw.map > I linked fftw3.lib in the project options. > > When using FFTW 2.1.5, I add the following files to the lib folder: > libfftw.a > libfftw.la > librfftw.a > librfftw.la > > There might be something I am missing. Please help. > > regards > Teboho > > > > >>> <wa...@wa...> 21/10/2004 19:26:34 >>> > On 21 Oct 2004 at 16:25, Teboho Nyareli wrote: > > > When using FFTW > > 3.01 binaries I add the fftw3.lib file via the menu project-> > object > > file or linker options in the Dev-C++. > > .lib? I believe that's your problem. You should be linking a .a file > not a .lib file. > > Watson (the pencil neck) Davis > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on > ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give > us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find > out more http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ Dev-cpp-users mailing > list Dev...@li... TO UNSUBSCRIBE: > http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > MailScanner thanks transtec Computers for their support. > |
From: Teboho N. <TNy...@cs...> - 2004-10-25 09:59:04
|
Hi Watson, It works fine with FFTW 2.1.5 version. I will just have to wait for a FFTW 3.0.1 Dev Pack. Thanks everyone for the help Teboho >>> <wa...@wa...> 22/10/2004 08:48:56 >>> I have not used the FFTW libraries and I don't have them installed and I don't have time right now to download them and write something to test them. But as I said, the FFTW 3.01 files look like they're set up for Visual C++. The hint is in the way the library is named. With Dev C++/mingw, the format for the library is lib<library name>.a Take a look at the FFTW 2.1.5 filenames, they follow this convention. I would not expect the fftw3.lib file to link properly. It's almost definitely in the wrong format. I think you're stuck with using FFTW 2.1.5 until someone comes out with a FFTW 3.0.1 Dev Pack for Dev C++/MinGW... unless you pick up another compiler. Sorry. Watson (the pencil neck) Davis On 22 Oct 2004 at 8:26, Teboho Nyareli wrote: > Hi Watson, > FFTW 3.01 ( fftw-3.0.1-w32-pl1 )comes with following files: > fftw3.dll > fftw3.exp > fftw3.h > fftw3.lib > fftw.map > I linked fftw3.lib in the project options. > > When using FFTW 2.1.5, I add the following files to the lib folder: > libfftw.a > libfftw.la > librfftw.a > librfftw.la > > There might be something I am missing. Please help. > > regards > Teboho > > > > >>> <wa...@wa...> 21/10/2004 19:26:34 >>> > On 21 Oct 2004 at 16:25, Teboho Nyareli wrote: > > > When using FFTW > > 3.01 binaries I add the fftw3.lib file via the menu project-> > object > > file or linker options in the Dev-C++. > > .lib? I believe that's your problem. You should be linking a .a file > not a .lib file. > > Watson (the pencil neck) Davis > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on > ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give > us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find > out more http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ Dev-cpp-users mailing > list Dev...@li... TO UNSUBSCRIBE: > http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > MailScanner thanks transtec Computers for their support. > ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. |
From: Siva C. <siv...@ya...> - 2004-10-28 17:23:35
|
Hello, --- Teboho Nyareli <TNy...@cs...> wrote: > Hi Watson, > It works fine with FFTW 2.1.5 version. I will just > have to wait for a > FFTW 3.0.1 Dev Pack. I still would stick to the fact that I am able to use fftw comfortably with Windows binaries compiled with gcc under MinGW which I downloaded from : ftp://ftp.fftw.org/pub/fftw/fftw3win32mingw.zip I just link to the fftw3.lib file! There has been a debate on wether a *.lib file can be linked. But around 2 weeks back there was response, I do not remember from whom, which said the *.lib files created using the C language can be linked even under the gcc system. I guess this is how I am able to get my work done! Siva Chandra. __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail |
From: Cary H. <xen...@gm...> - 2004-10-21 13:11:59
|
Those errors look would suggest that your missing a header file or something. I dont know what headers that fftw uses, but thats where I would start. Also make sure that that there is a 'using namespace <name>;' statement, if one is required. On Thu, 21 Oct 2004 11:31:13 +0200, Teboho Nyareli <tny...@cs...> wrote: > Hi Siva, > I am still getting the same errors even with fftw-2.1.5. version. > > c:\dev-c++\examples\fft\fft.o(.text+0x29):fft.cpp: undefined reference > to `fftw_malloc' > c:\dev-c++\examples\fft\fft.o(.text+0x42):fft.cpp: undefined reference > to `fftw_malloc' > c:\dev-c++\examples\fft\fft.o(.text+0x58):fft.cpp: undefined reference > to `fftw_create_plan' > c:\dev-c++\examples\fft\fft.o(.text+0x74):fft.cpp: undefined reference > to `fftw_one' > c:\dev-c++\examples\fft\fft.o(.text+0x83):fft.cpp: undefined reference > to `fftw_destroy_plan' > c:\dev-c++\examples\fft\fft.o(.text+0x92):fft.cpp: undefined reference > to `fftw_free' > c:\dev-c++\examples\fft\fft.o(.text+0xa1):fft.cpp: undefined reference > to `fftw_free' > > > thanks in advance > Teboho > > >>> Siva Chandra <siv...@ya...> 20/10/2004 09:54:19 >>> > > > > Hello, > > There is a Dev-Pak now available for fftw at > http://www.devpaks.org/ (it is listed under the > mathematics section there). > > You may try using it. But It is for an older version > fftw-2.1.5. > > HTH, > Siva Chandra > > _______________________________ > Do you Yahoo!? > Declare Yourself - Register online to vote today! > http://vote.yahoo.com > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on > ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give > us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > MailScanner thanks transtec Computers for their support. > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Daniel K. O. <dan...@ya...> - 2004-10-21 20:15:44
|
Cary Haynie wrote: >Those errors look would suggest that your missing a header file or something. > > Actually, it suggests that the lib is missing from the linking stage. >>I am still getting the same errors even with fftw-2.1.5. version. >> >>c:\dev-c++\examples\fft\fft.o(.text+0x29):fft.cpp: undefined reference >>to `fftw_malloc' >> >> I didn't test the 2.1.5 version (I don't even know what's a FFT library for), but the 3.0.1 binary available at http://www.fftw.org works out of the box. Seems that you aren't linking to the lib. Make sure to put every file in its right place. The .h file goes to the include folder, the .dll goes to somewhere in your path, and the other files go to your lib folder. Then in your project options you have to add the .lib file to the linker options. This (from http://www.fftw.org/fftw3_doc/Complex-One_002dDimensional-DFTs.html#Complex-One_002dDimensional-DFTs ) compiles and runs fine: --- #include <fftw3.h> int main(void) { fftw_complex *in, *out; fftw_plan p; int N=16; in = fftw_malloc(sizeof(fftw_complex) * N); out = 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; } --- Daniel K. O. |