I have cleaned up the output from the compilation a bit. I had several dublicate routines which I commmented out and now I get this error:
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Compiling>mingw32-make
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/DoubPrec.f90 -o Obj_win32/DoubPrec.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/SysGnuWin.f90 -o Obj_win32/SysGnuWin.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/NWTC_IO.f90 -o Obj_win32/NWTC_IO.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/NWTC_Num.f90 -o Obj_win32/NWTC_Num.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/ModMesh.f90 -o Obj_win32/ModMesh.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/NWTC_Aero.f90 -o Obj_win32/NWTC_Aero.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/NWTC_Library.f90 -o Obj_win32/NWTC_Library.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/SharedInflowDefs.f90 -o Obj_win32/SharedInflowDefs.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/HHWind.f90 -o Obj_win32/HHWind.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/FFWind.f90 -o Obj_win32/FFWind.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/HAWCWind.f90 -o Obj_win32/HAWCWind.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/FDWind.f90 -o Obj_win32/FDWind.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/CTWind.f90 -o Obj_win32/CTWind.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/UserWind.f90 -o Obj_win32/UserWind.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/InflowWindMod.f90 -o Obj_win32/InflowWindMod.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/SharedTypes.f90 -o Obj_win32/SharedTypes.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/AeroMods.f90 -o Obj_win32/AeroMods.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/GenSubs.f90 -o Obj_win32/GenSubs.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/AeroSubs.f90 -o Obj_win32/AeroSubs.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/AeroDyn.f90 -o Obj_win32/AeroDyn.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/FFTMod.f90 -o Obj_win32/FFTMod.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/HydroCalc.f90 -o Obj_win32/HydroCalc.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-lengt
h-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sour
ce/fftpack.f -o Obj_win32/fftpack.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/FAST_Mods.f90 -o Obj_win32/FAST_Mods.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/Noise.f90 -o Obj_win32/Noise.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/FAST_IO.f90 -o Obj_win32/FAST_IO.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/FAST.f90 -o Obj_win32/FAST.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/FAST_Lin.f90 -o Obj_win32/FAST_Lin.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/FAST2ADAMS.f90 -o Obj_win32/FAST2ADAMS.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/AeroCalc.f90 -o Obj_win32/AeroCalc.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/SetVersion.f90 -o Obj_win32/SetVersion.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/FAST_Prog.f90 -o Obj_win32/FAST_Prog.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/PitchCntrl_ACH.f90 -o Obj_win32/PitchCntrl_ACH.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/UserSubs.f90 -o Obj_win32/UserSubs.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/UserVSCont_KP.f90 -o Obj_win32/UserVSCont_KP.obj -J Obj_win32
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng
th-none -fdefault-real-8 -c C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Sou
rce/BladedInterfaceWindowsDLL.f90 -o Obj_win32/BladedInterfaceWindowsDLL.obj -J
Obj_win32
C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/BladedInterfaceWindowsDL
L.f90:469.15:
DO I = 1,N ! Loop through all torque-speed look-up table elements
1
Warning: DO loop at (1) will be executed zero times
gfortran -O2 -m32 -fbacktrace -fdefault-real-8 -I Obj_win32 -o ./FAST_gwin32.exe
\
Obj_win32/DoubPrec.obj Obj_win32/SysGnuWin.obj Obj_win32/NWTC_IO.obj Obj_win
32/NWTC_Num.obj Obj_win32/ModMesh.obj Obj_win32/NWTC_Aero.obj Obj_win32/NWTC_
Library.obj Obj_win32/SharedInflowDefs.obj Obj_win32/HHWind.obj Obj_win32/FFW
ind.obj Obj_win32/HAWCWind.obj Obj_win32/FDWind.obj Obj_win32/CTWind.obj Obj
_win32/UserWind.obj Obj_win32/InflowWindMod.obj Obj_win32/SharedTypes.obj Obj
_win32/AeroMods.obj Obj_win32/GenSubs.obj Obj_win32/AeroSubs.obj Obj_win32/Ae
roDyn.obj Obj_win32/FFTMod.obj Obj_win32/HydroCalc.obj Obj_win32/fftpack.obj
Obj_win32/FAST_Mods.obj Obj_win32/Noise.obj Obj_win32/FAST_IO.obj Obj_win32/
FAST.obj Obj_win32/FAST_Lin.obj Obj_win32/FAST2ADAMS.obj Obj_win32/AeroCalc.o
bj Obj_win32/SetVersion.obj Obj_win32/FAST_Prog.obj Obj_win32/PitchCntrl_ACH.
obj Obj_win32/UserSubs.obj Obj_win32/UserVSCont_KP.obj Obj_win32/BladedInterf
aceWindowsDLL.obj
Warning: solving _GetProcAddress by linking to _GetProcAddress@8
Use --enable-stdcall-fixup to deactivate these warnings
Use --disable-stdcall-fixup to deactivate these corrections
Warning: solving _GetLastError by linking to _GetLastError@0
Obj_win32/BladedInterfaceWindowsDLL.obj:BladedInterfaceWindowsDLL.f90:(.text+0xb
5): undefined reference to `LoadLibraryA'
collect2.exe: error: ld returned 1 exit status
makefile:224: recipe for target 'FAST_gwin32.exe' failed
mingw32-make: *** [FAST_gwin32.exe] Error 1
seems like there is a problem with it complaining about undefined reference to `LoadLibraryAâ. Which is defined this way in BladedInterfaceWindowsDLL.f90
MODULE DLL_Interface
USE ISO_C_BINDING
IMPLICIT NONE
! define some function binded to kernel32.dll exports
INTERFACE
FUNCTION LoadLibraryA(lpFileName) BIND(C,NAME='LoadLibraryA')
USE ISO_C_BINDING
IMPLICIT NONE
INTEGER(C_INTPTR_T) LoadLibraryA
CHARACTER(KIND=C_CHAR) lpFileName
END FUNCTION LoadLibraryA
FUNCTION GetProcAddress(hModule, lpProcName) BIND(C,NAME='GetProcAddress')
USE ISO_C_BINDING
IMPLICIT NONE
TYPE(C_FUNPTR) GetProcAddress
INTEGER(C_INTPTR_T), VALUE :: hModule
CHARACTER(KIND=C_CHAR) lpProcName
END FUNCTION GetProcAddress
FUNCTION FreeLibrary(hModule) BIND(C,NAME='FreeLibrary')
USE ISO_C_BINDING
IMPLICIT NONE
INTEGER(C_INTPTR_T), VALUE :: hModule
INTEGER(C_INT) FreeLibrary
END FUNCTION FreeLibrary
FUNCTION GetLastError() BIND(C,NAME='GetLastError')
USE ISO_C_BINDING
IMPLICIT NONE
INTEGER(C_INT32_T) GetLastError
END FUNCTION GetLastError
END INTERFACE
! Defined TYPEs:
TYPE DLL_Type
INTEGER(C_INTPTR_T) :: FileAddr = 0
TYPE(C_FUNPTR) :: ProcAddr = C_NULL_FUNPTR ! The address of procedure ProcName.
CHARACTER(1024) :: FileName ! The name of the DLL file including the full path to the current working directory.
CHARACTER(1024) :: ProcName ! The name of the procedure in the DLL that will be called.
END TYPE DLL_Type
! DLL Interface:
ABSTRACT INTERFACE
SUBROUTINE DLL_Procedure ( avrSWAP, aviFAIL, accINFILE, avcOUTNAME, avcMSG )
REAL(4) :: avrSWAP (*)
INTEGER(4) :: aviFAIL
INTEGER(1) :: accINFILE (*)
INTEGER(1) :: avcMSG (*)
INTEGER(1) :: avcOUTNAME(*)
END SUBROUTINE DLL_Procedure
END INTERFACE
CONTAINS
!=======================================================================
SUBROUTINE LoadDLL ( DLL )
! This SUBROUTINE is used to load the DLL.
!bjj start of proposed change
USE NWTC_LIBRARY, ONLY: ProgAbort, Int2LStr
!bjj end of proposed change
IMPLICIT NONE
! Passed Variables:
TYPE (DLL_Type), POINTER :: DLL ! The DLL to be loaded.
DLL%FileAddr = LoadLibraryA( TRIM(DLL%FileName)//C_NULL_CHAR)
IF(DLL%FileAddr == 0) THEN
CALL ProgAbort(' The DLL '//TRIM(DLL%FileName)//' could not be loaded. Error: '//TRIM(Int2LStr(GetLastError())))
ENDIF
DLL%ProcAddr = GetProcAddress( DLL%FileAddr, TRIM(DLL%ProcName)//C_NULL_CHAR )
IF(.NOT. C_ASSOCIATED(DLL%ProcAddr)) THEN
CALL ProgAbort( ' The procedure '//TRIM(DLL%ProcName)//' could not be loaded. Error: '//TRIM(Int2LStr(GetLastError())) )
ENDIF
RETURN
END SUBROUTINE LoadDLL
!=======================================================================
SUBROUTINE CallDLL ( DLL, avrSWAP, aviFAIL, accINFILE, avcOUTNAME, avcMSG )
! This SUBROUTINE is used to call the DLL.
IMPLICIT NONE
! Passed Variables:
REAL(4), INTENT(INOUT) :: avrSWAP (*) ! The swap array, used to pass data to, and receive data from, the DLL controller.
INTEGER(4), INTENT( OUT) :: aviFAIL ! A flag used to indicate the success of this DLL call set as follows: 0 if the DLL call was successful, >0 if the DLL call was successful but cMessage should be issued as a warning messsage, <0 if the DLL call was unsuccessful or for any other reason the simulation is to be stopped at this point with cMessage as the error message.
INTEGER(1), INTENT(IN ) :: accINFILE (*) ! The address of the first record of an array of 1-byte CHARACTERs giving the name of the parameter input file, 'DISCON.IN'.
INTEGER(1), INTENT( OUT) :: avcMSG (*) ! The address of the first record of an array of 1-byte CHARACTERS giving the message contained in cMessage, which will be displayed by the calling program if aviFAIL <> 0.
INTEGER(1), INTENT(IN ) :: avcOUTNAME(*) ! The address of the first record of an array of 1-byte CHARACTERS giving the simulation run name without extension.
TYPE (DLL_Type), INTENT(IN ) :: DLL ! The DLL to be called.
! Local Variables:
PROCEDURE(DLL_Procedure), POINTER :: DLL_ProcAddr
! Call the DLL through a POINTER:
CALL C_F_PROCPOINTER(DLL%ProcAddr,DLL_ProcAddr)
CALL DLL_ProcAddr ( avrSWAP, aviFAIL, accINFILE, avcOUTNAME, avcMSG )
RETURN
END SUBROUTINE CallDLL
!=======================================================================
END MODULE DLL_Interface