Topic: help with including the fftw3 library in simply fortran 3 under window

Hi,

I am using Windows 10 and I tried to include the compiled 64-bit FFTW from online sources to implement an MPI code from my advisor written with Fortran 77. But I meet a problem:

==============================================================================
Generating Makefile... Okay
==============================================================================
Generating target.exe
build\BICylE_3D_lab_induced_addstress_nochange_Semechah.o: In function `twofftf':
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C:\Users\tanxi\Desktop\Rate and State\code try\New folder\New folder/./BICylE_3D_lab_induced_addstress_nochange_Semechah.f:2989: undefined reference to `dfftw_execute_dft'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C:\Users\tanxi\Desktop\Rate and State\code try\New folder\New folder/./BICylE_3D_lab_induced_addstress_nochange_Semechah.f:3039: undefined reference to `dfftw_execute_dft'
build\BICylE_3D_lab_induced_addstress_nochange_Semechah.o: In function `twofftb':
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C:\Users\tanxi\Desktop\Rate and State\code try\New folder\New folder/./BICylE_3D_lab_induced_addstress_nochange_Semechah.f:3082: undefined reference to `dfftw_execute_dft'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C:\Users\tanxi\Desktop\Rate and State\code try\New folder\New folder/./BICylE_3D_lab_induced_addstress_nochange_Semechah.f:3108: undefined reference to `dfftw_execute_dft'
build\BICylE_3D_lab_induced_addstress_nochange_Semechah.o: In function `code':
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C:\Users\tanxi\Desktop\Rate and State\code try\New folder\New folder/./BICylE_3D_lab_induced_addstress_nochange_Semechah.f:165: undefined reference to `dfftw_plan_dft_1d'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C:\Users\tanxi\Desktop\Rate and State\code try\New folder\New folder/./BICylE_3D_lab_induced_addstress_nochange_Semechah.f:167: undefined reference to `dfftw_plan_dft_1d'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C:\Users\tanxi\Desktop\Rate and State\code try\New folder\New folder/./BICylE_3D_lab_induced_addstress_nochange_Semechah.f:169: undefined reference to `dfftw_plan_dft_1d'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C:\Users\tanxi\Desktop\Rate and State\code try\New folder\New folder/./BICylE_3D_lab_induced_addstress_nochange_Semechah.f:171: undefined reference to `dfftw_plan_dft_1d'
collect2.exe: error: ld returned 1 exit status
Error: Last command making (target.exe) returned a bad status
Error: Make execution terminated

* Failed *

Could you please help with that?

Thanks a lot,
Xinyu

Re: help with including the fftw3 library in simply fortran 3 under window

Xinyu,

The linker is unable to find some routines provided by FFTW during the final linking step.  Do you have the FFTW library?  If so, where did you get it, exactly? 

You'll probably just need to add the proper compiler flags, but it would help if you could explain a bit more about where you acquired the FFTW library so I could suggest some flags.

Jeff Armstrong
Approximatrix, LLC