Instructions for Compiling FAST

Hi all,

This forum has been very helpful for me. I got to learn a lot about many details about running FAST and interpreting the results.

I am modeling a 13.2 MW wind turbine on a semi-submersible platform. For that, I am trying to compile DISCON.dll and FAST (version 7). Though the compilation goes fine, the results, after I run the compiled FAST for my model, does not seem appropriate. The steps I follow are:

  1. Edit the DISCON.f90 file (provided and edited by JASON) for my wind turbine model control parameters.
  2. Compile this to produce DISCON.dll.
  3. Compile FAST for BladedDLLInterface using the source files provided in the packages (FAST, AeroDyn, NWTC subroutines, InflowWind).

Am I missing some step?
To give you an idea of the results I get, here is an image of the blade pitch time series that I get. It goes to a constant value at about 770 seconds.


There might be some problem with the way I am compiling.

Thanks!

Hi, Mohit.

I don’t think this is a problem with compiling.

It could be a problem in the controller logic or some setting in the model. Perhaps the wind speed changes at 770 seconds?

Bonnie,
Thanks for your help. I’ll look into the controller logic carefully and try to see what’s the problem.

Hello everybody,

I tried to compile the new FAST version v8.08 with standard settings (Win32) and using the supplied Visual Studio project file this works fine. When I try to compile it for x64 systems I get the error that the MAP_x64.lib is missing. However, this seems reasonable, since this file doesn’t exist in the MAP directory. So I thought that it’s part of the MAP archive, but this doesn’t contain suche a file, too. Can anybody tell me where I can find the newest version of the MAP_x64.lib?

Thanks in advance and best regards,

Jan

Hi, Jan.

I’ve updated the archive on the website to include the missing MAP_x64.lib file: wind.nrel.gov/designcodes/simula 
 0c-bjj.exe
You’ll have to download the archive again. Sorry about that!

Hi Bonnie,

I thank you! It works fine with newest version of Intel Fortran Compiler.

Kind regards,

Jan

Dear Bonnie,

Thanks for your effort. I’m trying to compile FAST on a OpenSUSE (Linux OS). To make my reply as short as possible, I summarize the following points:

  1. I downloaded the Latest version of FAST (( FAST_v8.08.00c-bjj )),
  2. Extracted it,
  3. Copied the (Makefile) file from \Compiling to \Source,
  4. Opened the Linux terminal,
    and
  5. used the command: (( make ))

Problem#1:
Stops during compiling:

gfortran: error: ../Source/dependencies/MAP/MAP.so: No such file or directory make: *** [FAST_glin64] Error 1
Related Information:
MAP.so NOT exist in the Sources/dependencies/MAP, which comes along the FAST archive.
Attempted Solution:
Downloaded the Mooring Analysis Program (MAP) latest version (MAP_v0.87.06a-mdm), found the (MAP.so) file inside it, copied it back to /Source/dependencies/MAP, and tried to launch the command (make) again.

Problem#2:
Running the (make) command, I get:

 unrecognized option '--stack=999999999'

Related Information:
When opening the url provided in the (makefile) file to revise the available options for gfortran, I didnt find the -Wl,–stack=999999999,–large-address-aware options.
Attempted Solution:
I simply deleted them from the (MakeFile) as it is stated that they are not necessary for 64bit systems, which is my case.

Problem#3:
Running the (make) command, (for the third time - wishing that it would somehow tell me “success” which it didnt), I get:

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -llapack /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lblas collect2: error: ld returned 1 exit status make: *** [FAST_glin64] Error 1
Related Information:
I think that this piece of code is responsible for the error, but I cannot manage to decypher it.

ifeq ($(OS),Windows_NT) Registry = $(BIN_DIR)/Registry_win32.exe MAP_lib = $(MAP_DIR)/MAP_win32.lib LAPACK_LINK = -llapack -lblas -LC:/LAPACK/win32 else Registry = registry.exe MAP_lib = $(MAP_DIR)/MAP.so LAPACK_LINK = -llapack -lblas endif

Now this is where I’m stuck. I dont want to simply delete the (-llapack -lblas) before understanding what they are.

PS: I made sure I set the version to 64 bits inside the Makefile.

Any help would be appreciated.

Regards and Respects,
MJ

Hi, Mahmoud.

We don’t yet support FAST v8.08 on Linux, and so I’m not surprised that there have been some issues.

Regarding Problem #1:
The solution of getting MAP.so is okay for compiling. However, if you try to run FAST using the MAP module, it will crash with the 0.87.06a version you found. We haven’t yet updated MAP.so to the latest version. (Marco–the developer–no longer works at NREL. We are working with Marco to get a verison of MAP that is easier for us to maintain and distribute, but it may take a little while.) FAST may run okay with it if you run models that don’t use mooring lines.

Regarding Problem #2:
If the compiler complains, removing those options like you did is the way to go. Though, I should clarify that the options aren’t necessary for 64-bit compilers. If you are using a 32-bit compiler on a 64-bit system, you will probably want to have those options or their equivalent. (It will compile fine without these options with 32-bit compilers, but you may not be able to run some of the largers FAST models such as the OC4 Jacket.)

Regarding Problem #3:
Options -llapck and -lblas tell the compiler to link with libraries liblapack.so and libblas.so. As I understand it, most Linux systems have these LAPACK and BLAS libraries pre-installed, so I’d be surprised if they aren’t on your system. You will not be able to successfully create a FAST executable without these libraries. (You can install them yourself if you have to.)

Dear Bonnie,
I asked my system admins to provide me the LAPACK and BLAS packages, which they did.

Problem #4:

Obj_lin64/MAP.obj: In function `__map_MOD_map_init': MAP.f90:(.text+0x22bb): undefined reference to `MAPCALL_SetRootname' collect2: error: ld returned 1 exit status make: *** [FAST_glin64] Error 1

Perhaps thats because the (MAP.so) file does not support linux?

Request:
Is their any FAST v8 program that supports Linux?

Regards,
MJ

Hi,

I am having trouble compiling FAST, my computer skills are limited. I am following the information for compiling FAST v8 for Visual Basic with Fortran from the pre made Fortran file provided. When I build the file, am outputting the correct file to the bin folder as per your instructions but when I try to run, fast aborts.

I am using Visual Basic 2012 (and have access to 2010), and Intel compiler XE Fortran 2013 SP1.
I am receiving these errors:

‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Users\Eoghan\Desktop\FV8\bin\FAST_dev_Debug_Win32.exe’. Symbols loaded.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\ntdll.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\kernel32.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\KernelBase.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Users\Eoghan\Desktop\FV8\bin\MAP_win32.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\user32.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\gdi32.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\lpk.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\usp10.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\msvcrt.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\advapi32.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\sechost.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\rpcrt4.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\sspicli.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\cryptbase.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\msvcp100.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\msvcr100.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\imagehlp.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\imm32.dll’. Cannot find or open the PDB file.
‘FAST_dev_Debug_Win32.exe’ (Win32): Loaded ‘C:\Windows\SysWOW64\msctf.dll’. Cannot find or open the PDB file.

Additionally, I am wondering if there is a way to extend the run time of the cert test past 60s. When I try it fails at 72s.

Any help is appreciated.

I do also note that another user has had similar issues but I was unable to rectify the problem with the solutions provided to him.

Kind regards

Eoghan.

Hi, Eoghan.

The errors that say “Cannot find or open the PDB file” are typically displayed after the program you are debugging ends (if you are debugging and there are no more break points to stop at). The are expected, and I ignore them. If you “Start Without Debugging (Ctrl + F5)”, you don’t get those messages and the console window should stay open longer. That may help you see what is the problem that is causing FAST to abort. Alternatively, you could open a separate command window and run the executable from it–it won’t close on you. Check the screen for any error message from FAST itself.

For space considerations, the wind file I distribute with the 5MW CertTest cases contains only 60 seconds of usable time (with some additional time added in case the turbine is yawed). If you want to run longer simulations, you’ll have to give it a longer wind file. The TurbSim input file is in the archive; you can use that to generate longer files.

I am trying to rebuild the FAST S-Function with the MinGW32 gfortran compiler because I need FAST with the BLADEDLLInterface and I am having problems getting it to compile.

>> make_FAST_SFunc
Warning: Legacy MEX infrastructure is provided for compatibility; it will be removed in a future version
of MATLAB. For more information, consult the MEX release notes
http://www.mathworks.com/help/matlab/release-notes.html. 
> In make_FAST_SFunc at 66 
-> Options file specified on command line 
---------------------------------------------------------------- 
->    Options file           = gfortranmingw32.bat 
      MATLAB                 = C:\Program Files (x86)\MATLAB\R2014b 
->    COMPILER               = gfortran 
->    Compiler flags: 
         COMPFLAGS           = "C:\Program Files (x86)\MATLAB\R2014b\extern\include" -c -DMATLAB_MEX_FILE 
         OPTIMFLAGS          =  
         DEBUGFLAGS          =  
         arguments           =  
         Name switch         =  
->    Pre-linking commands   =  
->    LINKER                 = link 
->    Link directives: 
         LINKFLAGS           = /dll /export:MEXFUNCTION /LIBPATH:"C:\Program Files (x86)\MATLAB\R2014b\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib /implib:"C:\Users\AFE\AppData\Local\Temp\mex_WcNIUl\templib.x" /MAP:"FAST_SFunc.mexw32.map" /NOLOGO  /manifest /INCREMENTAL:NO 
         LINKDEBUGFLAGS      = /debug /PDB:"FAST_SFunc.mexw32.pdb" 
         LINKFLAGSPOST       =  
         Name directive      = /out:"FAST_SFunc.mexw32" 
         File link directive =  
         Lib. link directive =  
         Rsp file indicator  = @ 
->    Resource Compiler      = rc /fo "mexversion.res" 
->    Resource Linker        =  
---------------------------------------------------------------- 
 
 
--> gfortran  "C:\Program Files (x86)\MATLAB\R2014b\extern\include" -c -DMATLAB_MEX_FILE   -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\DoubPrec.f90 
 
gfortran: warning: C:\Program Files (x86)\MATLAB\R2014b\extern\include: linker input file unused because linking not done 
 
  C:\PROGRA~2\MATLAB\R2014B\BIN\MEX.PL: Error: Compile of 'C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\DoubPrec.f90' failed. 
 
Unable to complete successfully.

Error in make_FAST_SFunc (line 66)
mex('-v'                                             , ... %verbose

my FortranOptionsFile looks like this currently

@echo off
rem GFORTRANMINGW32.BAT
rem
rem ********************************************************************
rem General parameters
rem ********************************************************************
set MATLAB=%MATLAB%
set GFORTRAN_COMPILER12=%GFORTRAN_COMPILER12%
rem set GFORTRAN_COMPILER12=C:\MinGW\bin
set GFORTRAN_COMPILER_REDIST=%GFORTRAN_COMPILER12%\bin

SET PATH=%GFORTRAN_COMPILER12%\bin;%GFORTRAN_COMPILER12%\mingw32\bin;%GFORTRAN_COMPILER12%\msys\1.0\bin;%MATLAB_BIN%;%PATH%;
SET INCLUDE=%GFORTRAN_COMPILER12%\include;%GFORTRAN_COMPILER12%\msys\1.0\include;
SET LIB==%GFORTRAN_COMPILER12%\lib;%GFORTRAN_COMPILER12%\mingw32\lib;%GFORTRAN_COMPILER12%\msys\1.0\lib;%MATLAB%\extern\lib\win32;%LIB%;

set MW_TARGET_ARCH=win32

rem ********************************************************************
rem Compiler parameters
rem ********************************************************************
set COMPILER=gfortran
REM set COMPFLAGS=/fpp 
set COMPFLAGS="%MATLAB%\extern\include" -c -DMATLAB_MEX_FILE
set NAME_OBJECT=

rem ********************************************************************
rem Linker parameters
rem ********************************************************************
set LIBLOC=%MATLAB%\extern\lib\win32\microsoft
set LINKER=link
set LINKFLAGS=/dll /export:MEXFUNCTION /LIBPATH:"%LIBLOC%" libmx.lib libmex.lib libmat.lib /implib:"%LIB_NAME%.x" /MAP:"%OUTDIR%%MEX_NAME%%MEX_EXT%.map" /NOLOGO  /manifest /INCREMENTAL:NO
set LINKOPTIMFLAGS=
set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%%MEX_EXT%.pdb"
set LINK_FILE=
set LINK_LIB=
set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"
set RSP_FILE_INDICATOR=@

rem ********************************************************************
rem Resource compiler parameters
rem ********************************************************************
set RC_COMPILER=rc /fo "%OUTDIR%mexversion.res"
set RC_LINKER=

set POSTLINK_CMDS=del "%LIB_NAME%.x" "%LIB_NAME%.exp"
set POSTLINK_CMDS1=mt -outputresource:"%OUTDIR%%MEX_NAME%%MEX_EXT%";2 -manifest "%OUTDIR%%MEX_NAME%%MEX_EXT%.manifest"
set POSTLINK_CMDS2=del "%OUTDIR%%MEX_NAME%%MEX_EXT%.manifest" 
set POSTLINK_CMDS3=del "%OUTDIR%%MEX_NAME%%MEX_EXT%.map"

Well I have been able to build the FAST_SFunc using mingw32 and gnumex. I get a crash of ld.exe at the end of the compilation e.g.

>> make_FAST_SFunc
Warning: Legacy MEX infrastructure is provided for compatibility; it will be removed in a future version
of MATLAB. For more information, consult the MEX release notes
http://www.mathworks.com/help/matlab/release-notes.html. 
> In make_FAST_SFunc at 66 
-> Default options filename found in C:\Users\AFE\AppData\Roaming\MathWorks\MATLAB\R2014b 
---------------------------------------------------------------- 
->    Options file           = C:\Users\AFE\AppData\Roaming\MathWorks\MATLAB\R2014b\mexopts.bat 
      MATLAB                 = C:\PROGRA~2\MATLAB\R2014b 
->    COMPILER               = gfortran 
->    Compiler flags: 
         COMPFLAGS           = -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring 
         OPTIMFLAGS          = -O2 
         DEBUGFLAGS          = -g 
         arguments           =  
         Name switch         = -o 
->    Pre-linking commands   =  
->    LINKER                 = C:\PROGRA~2\MATLAB\R2014b\sys\perl\win32\bin\perl.exe C:\gnumex\linkmex.pl 
->    Link directives: 
         LINKFLAGS           =  -LC:\Users\AFE\AppData\Roaming\MATHWO~1\MATLAB\R2014b\gnumex 
         LINKDEBUGFLAGS      = -g  -Wl,--image-base,0x28000000\n 
         LINKFLAGSPOST       =  
         Name directive      = -o FAST_SFunc.mexw32 
         File link directive =  
         Lib. link directive =  
         Rsp file indicator  =  
->    Resource Compiler      = C:\PROGRA~2\MATLAB\R2014b\sys\perl\win32\bin\perl.exe C:\gnumex\rccompile.pl  -o mexversion.res 
->    Resource Linker        =  
---------------------------------------------------------------- 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\DoubPrec.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\DoubPrec.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SysMatlab.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SysMatlab.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_IO.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_IO.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_Num.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_Num.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_Aero.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_Aero.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\ModMesh.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\ModMesh.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_Library.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_Library.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SharedInflowDefs.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SharedInflowDefs.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\HHWind.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HHWind.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FFWind.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FFWind.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\HAWCWind.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FDWind.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FDWind.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\CTWind.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\CTWind.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\UserWind.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\UserWind.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\InflowWindMod.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\InflowWindMod.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SharedTypes.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SharedTypes.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroMods.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroMods.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\GenSubs.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\GenSubs.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroSubs.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroSubs.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroDyn.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroDyn.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FAST_Mods.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FAST_Mods.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\Noise.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\Noise.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\fftpack.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\fftpack.f 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FFTMod.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FFTMod.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\HydroCalc.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HydroCalc.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroCalc.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroCalc.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FAST_IO.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FAST_IO.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FAST.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FAST.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\PitchCntrl_ACH.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\PitchCntrl_ACH.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SetVersion.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SetVersion.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\UserSubs.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\UserSubs.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\UserVSCont_KP.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\UserVSCont_KP.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FASTSimulink.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FASTSimulink.f90 
 
 
--> gfortran  -c -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8 "-IC:\PROGRA~2\MATLAB\R2014b\extern\include" -DMATLAB_MEX_FILE -fno-underscoring -oC:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FASTGateway.obj -O2 -DMX_COMPAT_32 C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FASTGateway.f90 
 
 
--> C:\PROGRA~2\MATLAB\R2014b\sys\perl\win32\bin\perl.exe C:\gnumex\linkmex.pl -o FAST_SFunc.mexw32  -LC:\Users\AFE\AppData\Roaming\MATHWO~1\MATLAB\R2014b\gnumex -s  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\DoubPrec.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SysMatlab.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_IO.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_Num.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_Aero.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\ModMesh.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_Library.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SharedInflowDefs.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\HHWind.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FFWind.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\HAWCWind.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FDWind.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\CTWind.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\UserWind.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\InflowWindMod.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SharedTypes.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroMods.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\GenSubs.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroSubs.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroDyn.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FAST_Mods.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\Noise.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\fftpack.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FFTMod.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\HydroCalc.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroCalc.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FAST_IO.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FAST.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\PitchCntrl_ACH.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SetVersion.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\UserSubs.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\UserVSCont_KP.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FASTSimulink.obj  C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FASTGateway.obj   
 
C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SysMatlab.obj:SysMatlab.f90:(.text+0x6a): undefined reference to `mexprintf' 
C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SysMatlab.obj:SysMatlab.f90:(.text+0xbd): undefined reference to `mexerrmsgtxt' 
C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SysMatlab.obj:SysMatlab.f90:(.text+0xd5): undefined reference to `mexerrmsgtxt' 
C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SysMatlab.obj:SysMatlab.f90:(.text+0x873): undefined reference to `mexprintf' 
C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SysMatlab.obj:SysMatlab.f90:(.text+0xa62): undefined reference to `mexprintf' 
collect2.exe: error: ld returned 255 exit status 
link command: gfortran -shared C:\Users\AFE\AppData\Roaming\MATHWO~1\MATLAB\R2014b\gnumex\gfortmex.def -o FAST_SFunc.mexw32 -LC:\Users\AFE\AppData\Roaming\MATHWO~1\MATLAB\R2014b\gnumex -s C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\DoubPrec.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SysMatlab.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_IO.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_Num.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_Aero.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\ModMesh.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\NWTC_Library.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SharedInflowDefs.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\HHWind.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FFWind.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\HAWCWind.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FDWind.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\CTWind.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\UserWind.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\InflowWindMod.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SharedTypes.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroMods.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\GenSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroDyn.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FAST_Mods.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\Noise.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\fftpack.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FFTMod.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\HydroCalc.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\AeroCalc.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FAST_IO.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FAST.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\PitchCntrl_ACH.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\SetVersion.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\UserSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\UserVSCont_KP.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FASTSimulink.obj C:\Users\AFE\AppData\Local\Temp\mex_Nbve5H\FASTGateway.obj -lflibmx -lflibmex -lflibmat 
mex completed: FAST_SFunc.mexw32 has been created.

I made a few changes to the SysMatlab.f90 by commenting out

USE IFPORT

since there is no replacement to it in gfortran.

I am not sure why you say,

I would think the BladedDllInterface in FAST v7 would be much trickier to compile with gfortran than with Intel Fortran. You might want to see if you can compile the stand-alone version of FAST with the Bladed DLL Interface in gfortran before trying to compile FAST as a mex function in Matlab.

That said, it looks like you have a problem in the linking phase. You need to be able to link your gfortran-generated code with the libraries distributed with Matlab if you want to call any of the Matlab API routines. I think gcc/gfortran use different calling conventions than the Intel libraries (which Matlab supports), so it’s not going to be incredibly easy. As a first try, you could eliminate all the calls to the Matlab API in SysMatlab.f90. These are all the mex* functions that are undefined after your linking stage–they are mostly used for printing to the Matlab Command Window. You might be able to replace SysMatlab.f90 with SysLabview.f90 and see if it links.

Many thanks for your suggestions. I decided to go back to see if I can compile the pure FORTRAN version of FAST v7 with gfortran and the BLADEDLLInterface.f90 included. Since BLADEDLLInterface.f90 is highly dependent on the Intel FORTRAN compiler I looked through the forum and found this post:

which has a gfortran working BLADEDLLInterface.f90 which was the version I used above trying to compile the MATLAB mex file. But alas the I get the same crash of ld.exe

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/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/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/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/PitchCntrl
_ACH.obj  Obj_win32/UserSubs.obj  Obj_win32/UserVSCont_KP.obj  Obj_win32/AeroCal
c.obj  Obj_win32/SetVersion.obj  Obj_win32/FAST_Prog.obj  Obj_win32/BladedInterf
aceWindowsDLL.obj
Obj_win32/BladedInterfaceWindowsDLL.obj:BladedInterfaceWindowsDLL.f90:(.text+0x1
600): flere definitioner af "pitchcntrl_"
Obj_win32/PitchCntrl_ACH.obj:PitchCntrl_ACH.f90:(.text+0x13c0): forst defineret
hér
Obj_win32/BladedInterfaceWindowsDLL.obj:BladedInterfaceWindowsDLL.f90:(.text+0x1
640): flere definitioner af "userhssbr_"
Obj_win32/UserSubs.obj:UserSubs.f90:(.text+0x0): forst defineret hér
Obj_win32/BladedInterfaceWindowsDLL.obj:BladedInterfaceWindowsDLL.f90:(.text+0x1
6e0): flere definitioner af "uservscont_"
Obj_win32/UserVSCont_KP.obj:UserVSCont_KP.f90:(.text+0x0): forst defineret hér
Obj_win32/BladedInterfaceWindowsDLL.obj:BladedInterfaceWindowsDLL.f90:(.text+0x1
7e0): flere definitioner af "useryawcont_"
Obj_win32/UserSubs.obj:UserSubs.f90:(.text+0x390): forst defineret hér
Advarsel: loser _GetProcAddress ved at lĂŠnke til _GetProcAddress@8
Brug --enable-stdcall-fixup til at deaktivere disse advarsler
Brug --disable-stdcall-fixup til at deaktivere disse rettelser
Advarsel: loser _GetLastError ved at lĂŠnke til _GetLastError@0
collect2.exe: error: ld returned 255 exit status
makefile:224: recipe for target 'FAST_gwin32.exe' failed
mingw32-make: *** [FAST_gwin32.exe] Error 1

Would be it possible to get a version of the FAST_SFunc.mexw32 with the BladedDLLInterface.f90 added?

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

Hi, Andre.

I don’t have a lot of time to help with this, but I will point you to the definitions in SysGnuWin.f90, found in the NWTC_Library (v2) archives.[code] INTERFACE ! Definitions of Windows API routines
FUNCTION LoadLibrary(lpFileName) BIND(C,NAME=‘LoadLibraryA’)
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
!GCC$ ATTRIBUTES STDCALL :: LoadLibrary
INTEGER(C_INTPTR_T) :: LoadLibrary
CHARACTER(KIND=C_CHAR) :: lpFileName(*)
END FUNCTION LoadLibrary

  FUNCTION GetProcAddress(hModule, lpProcName) BIND(C, NAME='GetProcAddress')
     USE, INTRINSIC :: ISO_C_BINDING
     IMPLICIT NONE
     !GCC$ ATTRIBUTES STDCALL :: GetProcAddress
     TYPE(C_FUNPTR)             :: GetProcAddress
     INTEGER(C_INTPTR_T),VALUE  :: hModule
     CHARACTER(KIND=C_CHAR)     :: lpProcName(*)
  END FUNCTION GetProcAddress

END INTERFACE
[/code]Make sure you add the STDCALL attribute for the gfortran compiler (!GCC$) so it uses the correct calling convention. FAST v8 calls the Bladed DLL with either gfortran or IVF, so if you get stuck, take a look at that source code.

Many thanks for the above info that helped alot and I am able now build FAST v7 with the BladedDLL. There is one warning that still bothers me though

C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/BladedInterfaceWindowsDL
L.f90:472.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

which is part of the BladedDLLInterface subroutine and code is just this:

   DO I = 1,N  ! Loop through all torque-speed look-up table elements
      avrSWAP( R + (2*I) - 2 ) = GenSpd_TLU(I)           ! Generator speed  look-up table elements (rad/s)
      avrSWAP( R + (2*I) - 1 ) = GenTrq_TLU(I)           ! Generator torque look-up table elements (Nm   )
   ENDDO

The problem in the linking phase with the gfortran compiler is a case sensitivity problem. GFORTRAN looks for a mexprintf routine and not the mexPrintf routine as it should. Still trying to figure out how to fix that.

I am currently trying my gfortran build FAST v7 with the BladedDLLInterface included but I am getting segmentation faults. Which I think are due to DISCON.DLL. Do I need to recompile that as well with gfortran?

C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\NREL5MWTest\NRELOffshrBsline5MW
_ITIBarge4>FAST_gwin32 [/h] NRELOffshrBsline5MW_Floating.fst

  Running NWTC Subroutine Library (v1.07.02a-mlb, 21-May-2013).

  Running FAST (v7.02.00d-bjj, 20-Feb-2013)-Compiled using DOUBLE precision.

  Heading of the FAST input file: NREL 5.0 MW Baseline Wind Turbine for Use in O
ffshore Analysis.

  Running NWTC Subroutine Library (v1.07.02a-mlb, 21-May-2013).

  Running AeroDyn (v13.00.02a-bjj, 20-Feb-2013).
  Heading of the AeroDyn input file: NREL 5.0 MW offshore baseline aerodynamic i
nput properties;
  Compatible with AeroDyn v12.58.

  Running NWTC Subroutine Library (v1.07.02a-mlb, 21-May-2013).

  Using InflowWind (v1.02.00c-bjj, 23-Apr-2013)

  No file extension found. Assuming .\WindData\90m_12mps is a binary FF wind fil
e with a ".wnd"
  extension.

  Running NWTC Subroutine Library (v1.07.02a-mlb, 21-May-2013).

  Reading a 31x31 grid (145 m wide, 17.5 m to 162.5 m above ground) with a chara
cterstic wind
  speed of 12 m/s.
  Processed 51367 time steps of 80-Hz full-field data (642.08 seconds).
  Processed 51367 time steps of 4x1 tower data grids.
  Generating incident wave kinematics and current time history.
   WARNING:   The random number generator in use differs from the original code
provided by NREL.
  This pRNG uses 12 seeds instead of the 2 in the HydroDyn input file.
  Reading in WAMIT output with root name ".\HydroData\Barge".
  Computing radiation impulse response functions and wave diffraction forces.

  ADAMS dataset file 'NRELOffshrBsline5MW_Floating_ADAMS.adm' created.
  ADAMS command file 'NRELOffshrBsline5MW_Floating_ADAMS.acf' created.


 WARNING message from DISCON.dll:
 Running with torque and pitch control of the NREL offshore 5MW baseline wind tu
rbine from
 DISCON.dll as written by J. Jonkman of NREL/NWTC for use in the IEA Annex XXIII
 OC3 studies.


Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  6f610f4e
#1  6f6913eb
#2  004010f8

C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\NREL5MWTest\NRELOffshrBsline5MW
_ITIBarge4>