Building S-Function with Intel Fortran 2015

I am trying to build the S-Function with the Intel Fortran 2015 compiler & Visual Studio 2013 Community Edition on MATLAB 2014b (32 bit). But it fails for some reason.

>> make_FAST_SFunc_Intel
Verbose mode is on.
... Looking for compiler 'Intel Visual Fortran Composer XE 2015 with Microsoft Visual Studio 2013' ...
... Looking for environment variable 'IFORT_COMPILER15' ...Yes ('C:\Program Files (x86)\Intel\Composer XE 2015\').
... Looking for file 'C:\Program Files (x86)\Intel\Composer XE 2015\Bin\ia32\ifort.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Intel\Composer XE 2015' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...Yes ('C:\Program Files (x86)\Windows Kits\8.1\').
Found installed compiler 'Intel Visual Fortran Composer XE 2015 with Microsoft Visual Studio 2013'.
Set PATH = C:\Program Files (x86)\Intel\Composer XE 2015\bin\ia32;C:\Program Files (x86)\Microsoft Visual Studio 12.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\vcpackages;C:\Program Files (x86)\Microsoft Visual Studio 12.0\..\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\..\Common7\Tools;C:\Program Files (x86)\Windows Kits\8.1\\bin\x86;;C:\Program Files (x86)\Intel\Trace Analyzer and Collector\9.0.2.045\bin;C:\Program Files (x86)\Intel\MPI\5.0.2.044\intel64\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\mpirt;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32\mpirt;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32\compiler;C:\MinGW\bin;C:\MinGW\lib;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install;C:\Users\AFE\Documents\DEIF\FAST_v8\FAST_Install\bin;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MATLAB\R2014b\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Intel\Trace Analyzer and Collector\9.0.2.045\dll
Set INCLUDE = C:\Program Files (x86)\Intel\Composer XE 2015\compiler\include;C:\Program Files (x86)\Microsoft Visual Studio 12.0\include;C:\Program Files (x86)\Windows Kits\8.1\\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\\Include\um;C:\Program Files (x86)\Windows Kits\8.1\\Include\winrt;C:\Program Files (x86)\MATLAB\R2014b\extern\include;;C:\Program Files (x86)\Intel\Trace Analyzer and Collector\9.0.2.045\include
Set LIB = C:\Program Files (x86)\Intel\Composer XE 2015\compiler\lib\ia32;C:\Program Files (x86)\Microsoft Visual Studio 12.0\lib;C:\Program Files (x86)\Windows Kits\8.1\\Lib\winv6.3\um\x86;C:\Program Files (x86)\MATLAB\R2014b\lib\win32;;
Set LIBPATH = C:\Program Files (x86)\Intel\Composer XE 2015\compiler\lib\ia32;C:\Program Files (x86)\Microsoft Visual Studio 12.0\lib;C:\Program Files (x86)\Microsoft Visual Studio 12.0\atlmfc\lib;C:\Program Files (x86)\Windows Kits\8.1\\Lib\winv6.3\um\x86;C:\Program Files (x86)\MATLAB\R2014b\extern\lib\win32;;
Options file details
-------------------------------------------------------------------
	Compiler location: C:\Program Files (x86)\Intel\Composer XE 2015
	Options file: C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\intel_fortran_15_vs2013.xml
	CMDLINE200 : link  /nologo /manifest /INCREMENTAL:NO /DLL  /EXPORT:MEXFUNCTION C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\DoubPrec.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SysMatlab_Intel.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_IO.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Num.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Aero.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\ModMesh.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Library.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SharedInflowDefs.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HHWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FFWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HAWCWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FDWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\CTWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\InflowWindMod.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SharedTypes.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroMods.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\GenSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroDyn.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST_Mods.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\Noise.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\fftpack.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FFTMod.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HydroCalc.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroCalc.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST_IO.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\PitchCntrl_ACH.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SetVersion.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserVSCont_KP.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FASTSimulink.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FASTGateway.obj  /LIBPATH:"C:\Program Files (x86)\MATLAB\R2014b\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /out:C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.mexw32
	CMDLINE250 : mt -outputresource:C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.mexw32;2 -manifest C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.mexw32.manifest
	CMDLINE300 : del C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.exp C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.lib C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.mexw32.manifest C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.ilk
	COMPILER : ifort
	COMPFLAGS : /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source 
	COMPDEFINES : /DMX_COMPAT_32   /DMATLAB_MEX_FILE
	OPTIMFLAGS : /O2 /DNDEBUG
	INCLUDE : -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include"
	DEBUGFLAGS : /Z7
	LINKER : link
	LINKFLAGS :  /nologo /manifest /INCREMENTAL:NO
	LINKTYPE : /DLL
	LINKEXPORT : /EXPORT:MEXFUNCTION
	LINKLIBS : /LIBPATH:"C:\Program Files (x86)\MATLAB\R2014b\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
	LINKDEBUGFLAGS : /debug /PDB:"C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.mexw32.pdb"
	LINKOPTIMFLAGS : 
	OBJEXT : .obj
	LDEXT : .mexw32
	SETENV : set COMPILER=ifort
                set COMPFLAGS=/c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /DMX_COMPAT_32   /DMATLAB_MEX_FILE $MATLABMEX
                set OPTIMFLAGS=/O2 /DNDEBUG
                set DEBUGFLAGS=/Z7
                set LINKER=link
                set LINKFLAGS= /nologo /manifest /INCREMENTAL:NO /export:%ENTRYPOINT% /DLL /LIBPATH:"C:\Program Files (x86)\MATLAB\R2014b\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /EXPORT:MEXFUNCTION
                set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%.mexw32.pdb"
                set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"
	FORTRANROOT : C:\Program Files (x86)\Intel\Composer XE 2015
	VCROOT : C:\Program Files (x86)\Microsoft Visual Studio 12.0
	SDKROOT : C:\Program Files (x86)\Windows Kits\8.1\
	MATLABROOT : C:\Program Files (x86)\MATLAB\R2014b
	ARCH : win32
	SRC : C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\DoubPrec.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SysMatlab_Intel.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_IO.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_Num.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_Aero.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\ModMesh.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_Library.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SharedInflowDefs.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HHWind.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FFWind.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FDWind.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\CTWind.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\UserWind.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\InflowWindMod.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SharedTypes.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroMods.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\GenSubs.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroSubs.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroDyn.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FAST_Mods.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\Noise.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\fftpack.f;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FFTMod.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HydroCalc.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroCalc.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FAST_IO.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FAST.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\PitchCntrl_ACH.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SetVersion.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\UserSubs.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\UserVSCont_KP.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FASTSimulink.f90;C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FASTGateway.f90
	OBJ : C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\DoubPrec.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SysMatlab_Intel.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_IO.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Num.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Aero.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\ModMesh.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Library.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SharedInflowDefs.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HHWind.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FFWind.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HAWCWind.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FDWind.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\CTWind.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserWind.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\InflowWindMod.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SharedTypes.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroMods.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\GenSubs.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroSubs.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroDyn.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST_Mods.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\Noise.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\fftpack.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FFTMod.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HydroCalc.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroCalc.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST_IO.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\PitchCntrl_ACH.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SetVersion.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserSubs.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserVSCont_KP.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FASTSimulink.obj;C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FASTGateway.obj
	OBJS : C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\DoubPrec.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SysMatlab_Intel.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_IO.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Num.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Aero.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\ModMesh.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Library.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SharedInflowDefs.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HHWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FFWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HAWCWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FDWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\CTWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserWind.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\InflowWindMod.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SharedTypes.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroMods.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\GenSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroDyn.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST_Mods.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\Noise.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\fftpack.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FFTMod.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HydroCalc.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroCalc.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST_IO.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\PitchCntrl_ACH.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SetVersion.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserVSCont_KP.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FASTSimulink.obj C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FASTGateway.obj 
	SRCROOT : C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\DoubPrec
	DEF : C:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST_SFunc.def
	EXP : C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.exp
	LIB : C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.lib
	EXE : C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.mexw32
	ILK : C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.ilk
	MANIFEST : C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc.mexw32.manifest
	TEMPNAME : C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FAST_SFunc
	EXEDIR : C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\
	EXENAME : FAST_SFunc
	OPTIM : /O2 /DNDEBUG
	LINKOPTIM : 
	CMDLINE100_0 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\DoubPrec.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\DoubPrec.obj
	CMDLINE100_1 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SysMatlab_Intel.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SysMatlab_Intel.obj
	CMDLINE100_2 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_IO.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_IO.obj
	CMDLINE100_3 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_Num.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Num.obj
	CMDLINE100_4 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_Aero.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Aero.obj
	CMDLINE100_5 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\ModMesh.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\ModMesh.obj
	CMDLINE100_6 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\NWTC_Library.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\NWTC_Library.obj
	CMDLINE100_7 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SharedInflowDefs.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SharedInflowDefs.obj
	CMDLINE100_8 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HHWind.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HHWind.obj
	CMDLINE100_9 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FFWind.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FFWind.obj
	CMDLINE100_10 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HAWCWind.obj
	CMDLINE100_11 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FDWind.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FDWind.obj
	CMDLINE100_12 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\CTWind.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\CTWind.obj
	CMDLINE100_13 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\UserWind.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserWind.obj
	CMDLINE100_14 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\InflowWindMod.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\InflowWindMod.obj
	CMDLINE100_15 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SharedTypes.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SharedTypes.obj
	CMDLINE100_16 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroMods.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroMods.obj
	CMDLINE100_17 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\GenSubs.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\GenSubs.obj
	CMDLINE100_18 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroSubs.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroSubs.obj
	CMDLINE100_19 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroDyn.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroDyn.obj
	CMDLINE100_20 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FAST_Mods.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST_Mods.obj
	CMDLINE100_21 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\Noise.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\Noise.obj
	CMDLINE100_22 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\fftpack.f /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\fftpack.obj
	CMDLINE100_23 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FFTMod.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FFTMod.obj
	CMDLINE100_24 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HydroCalc.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HydroCalc.obj
	CMDLINE100_25 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\AeroCalc.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\AeroCalc.obj
	CMDLINE100_26 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FAST_IO.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST_IO.obj
	CMDLINE100_27 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\FAST.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FAST.obj
	CMDLINE100_28 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\PitchCntrl_ACH.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\PitchCntrl_ACH.obj
	CMDLINE100_29 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SetVersion.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SetVersion.obj
	CMDLINE100_30 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\UserSubs.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserSubs.obj
	CMDLINE100_31 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\UserVSCont_KP.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\UserVSCont_KP.obj
	CMDLINE100_32 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FASTSimulink.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FASTSimulink.obj
	CMDLINE100_33 : ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source\FASTGateway.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\FASTGateway.obj
-------------------------------------------------------------------
Building with 'Intel Visual Fortran Composer XE 2015 with Microsoft Visual Studio 2013'.
ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\DoubPrec.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\DoubPrec.obj
ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\SysMatlab_Intel.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\SysMatlab_Intel.obj
ifort /c /assume:byterecl /traceback /Qsave /Qzero /real_size:64 /Qprec -c -nologo /fp:source  /O2 /DNDEBUG /DMX_COMPAT_32   /DMATLAB_MEX_FILE -I"C:\Program Files (x86)\MATLAB\R2014b\extern\include" C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90 /FoC:\Users\AFE\AppData\Local\Temp\mex_42639424790472_6612\HAWCWind.obj
Error using mex
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(13): error #7002: Error in opening
the compiled module file.  Check INCLUDE paths.   [NWTC_LIBRARY]
   USE      NWTC_Library
------------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(14): error #7002: Error in opening
the compiled module file.  Check INCLUDE paths.   [SHAREDINFLOWDEFNS]
   USE      SharedInflowDefns
------------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(21): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi), ALLOCATABLE          :: WindData  (:,:,:,:)        ! Array of FF data for all 3 wind
   components
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(23): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                       :: deltaXInv                  ! multiplicative inverse of delta X
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(24): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                       :: deltaYInv                  ! multiplicative inverse of delta Y
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(25): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                       :: deltaZInv                  ! multiplicative inverse of delta Z
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(32): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                       :: GridBase                   ! the height of the bottom of the
   grid (Z direction) in meters
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(33): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                       :: LengthX                    ! the grid length in the X direction
   (distance between point 1 and the next point 1 [because it is periodic])
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(34): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                       :: LengthYHalf                ! half the grid width
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(35): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                       :: RefHt                      ! the reference (hub) height of the
   grid in meters
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(36): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                       :: URef                       ! the mean wind speed in m/s at
   height RefHt meters (as defined in the input file)
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(65): error #6683: A kind type
parameter must be a compile-time constant.   [SIKI]
   REAL(SiKi)                  :: DumReal                      ! real variable to temporarially store
   values read from binary file
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(67): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                  :: dx
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(68): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                  :: dy
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(69): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                  :: dz
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(70): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                  :: PLExp                        ! Power law exponent, for the PL mean
   wind profile type
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(71): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                  :: SF        (3)                ! The turbulence scale factors for the
   three components.
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(72): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                  :: U                            ! The mean wind speed
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(73): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                  :: Z                            ! The height above ground/sea level
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(74): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                  :: Z0                           ! Surface layer roughness length in
   meters, used for LOG profile type
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(416): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                    :: HW_GetValue
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(470): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi),        INTENT(IN) :: Time
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(471): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi),        INTENT(IN) :: InputPosition(3)
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(473): error #6457: This derived
type name has not been declared.   [INFLINTRPOUT]
   TYPE(InflIntrpOut)            :: HW_GetWindSpeed
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(464): error #6404: This name does
not have a type, and must have an explicit type.   [HW_GETWINDSPEED]
FUNCTION HW_GetWindSpeed(Time, InputPosition, ErrStat)
---------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(517): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi),      INTENT(IN) :: Position(3)       ! takes the place of XGrnd, YGrnd, ZGrnd
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(518): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi),      INTENT(IN) :: Time
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(519): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                  :: HW_LinearInterp(3)      ! The U, V, W velocities
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(525): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi)                  :: ShiftedXPosition
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(526): error #6683: A kind type
parameter must be a compile-time constant.   [REKI]
   REAL(ReKi),PARAMETER        :: Tol = 1.0E-3      ! a tolerance for determining if two reals are the
   same (for extrapolation)
--------^
C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90(723): catastrophic error: Too many
errors, exiting
compilation aborted for C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source\HAWCWind.f90 (code 1)


Error in make_FAST_SFunc_Intel (line 67)
mex('-v'                                             , ... %verbose

Hi, Andre.

From the error message, it looks like it’s trying to compile HAWCWind.f90 before it compiles NWTC_Library.f90. Did you change the order of the source files listed in make_FAST_SFunc.f90?

No I have not. Here is the matlab I use to try to build the S-Func. As you can see the NWTC_Library.f90 library is there and is being build before HAWCWind.f90.

% This script compiles the FAST S-Function assuming that each of the listed 
%   files is in the specified directory.
%
% National Renewable Energy Laboratory's 
% National Wind Technology Center                             31 March 2010
%  edited: 
%  + 26 November 2012 B. Jonkman to use NWTC Subroutine Library 1.05.00                                                            
%
% NOTE: We assume that the user of this script has some knowlege about 
% compiling Fortran and can access the Matlab documentation files for 
% assistance in using the mex function. Due to the large number of 
% possibilities of compilers, linkers, and Matlab versions, this list of 
% instructions is only a guide.
%
% Note that to make FortranOptionsFile, please do the following:
% (1) Copy intelf10msvs2005opts.bat or equivalent for your compiler/linker  
%     from folder "%MATLABROOT%\bin\win32\mexopts" (or equivalent 
%     directory; see mex documentation for details) into the folder where 
%     "make_FAST_SFunc.m" is stored. (Then, change the variable
%     "FortranOptionsFile" in the script below to be the name of this file.)
% (2) Verify that the general parameters in the new batch file point to  
%     the correct paths for your compiler and linker. Modify if necessary.
%     (If you are using IVF, you should make sure that the paths in the
%     compiler's IFORTVARS.bat file are listed in your new .bat file.
%     If all else fails, open the IVF command prompt window and copy the 
%     %PATH%, %LIB%, and %INCLUDE% environment variables it has set [type 
%          echo PATH=%PATH%; LIB=%LIB%; INCLUDE=%INCLUDE%;
%     and then copy the text into your .bat file on the 3 lines for those 
%     variables ])    
% (3) Change COMPFLAGS in this new .bat file: 
%     add these flags if they aren't there already:
%             /assume:byterecl /traceback /real_size:64 /Qzero /Qsave 
%     remove these flags if they exist:
%            /fpp /fixed
% (4) Check variables OPTIMFLAGS and DEBUGFLAGS in the .bat file:
%     remove /MD if it is there
%
%% ------------------------------------------------------------------------
% Set the name of the batch file containing the locations of the compiler 
% and linker, along with the correct compiler and linker flags for FAST.
%--------------------------------------------------------------------------
FortranSetupFile = 'intel_fortran_15_vs2013.xml';
%FortranOptionsFile = 'intelf13msvs2012opts.bat';
%
%'COMPFLAGS#"$COMPFLAGS /assume:byterecl /traceback /Qsave /Qzero /real_size:64"',

%--------------------------------------------------------------------------
% Set the name of the output function
%--------------------------------------------------------------------------
OutputRootName     = 'FAST_SFunc';                  % name of the mex file

%--------------------------------------------------------------------------
% Set the paths pointing to the Fortran source code for
% NWTC_Library (NWTC_LIB), AeroDyn (AD_LOC), InflowWind 
% routines (WIND_LOC), and FAST (FAST_LOC):
%--------------------------------------------------------------------------
NWTC_LIB    = 'C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source';
WIND_LOC    = 'C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source';
AD_LOC      = 'C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source';
FAST_LOC    = 'C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Source';
Sim_LOC     = 'C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Simulink\Source';


%% ------------------------------------------------------------------------
% Compile the mex function
%--------------------------------------------------------------------------
mex('-v'                                             , ... %verbose
    '-compatibleArrayDims'                           , ... %use limited array handling (not large array dims)
    '-f',      FortranSetupFile                      , ... %file containing fortran setup
    '-output', OutputRootName                        , ... %name of the resulting mex function
    fullfile(NWTC_LIB, 'DoubPrec.f90'               ), ...
    fullfile(NWTC_LIB, 'SysMatlab_Intel.f90'        ), ...
    fullfile(NWTC_LIB, 'NWTC_IO.f90'                ), ...
    fullfile(NWTC_LIB, 'NWTC_Num.f90'               ), ...
    fullfile(NWTC_LIB, 'NWTC_Aero.f90'              ), ...
    fullfile(NWTC_LIB, 'ModMesh.f90'                ), ...
    fullfile(NWTC_LIB, 'NWTC_Library.f90'           ), ...
    fullfile(WIND_LOC, 'SharedInflowDefs.f90'       ), ...
    fullfile(WIND_LOC, 'HHWind.f90'                 ), ...
    fullfile(WIND_LOC, 'FFWind.f90'                 ), ...
    fullfile(WIND_LOC, 'HAWCWind.f90'               ), ...
    fullfile(WIND_LOC, 'FDWind.f90'                 ), ...
    fullfile(WIND_LOC, 'CTWind.f90'                 ), ...
    fullfile(WIND_LOC, 'UserWind.f90'               ), ...
    fullfile(WIND_LOC, 'InflowWindMod.f90'          ), ...
    fullfile(AD_LOC,   'SharedTypes.f90'            ), ...
    fullfile(AD_LOC,   'AeroMods.f90'               ), ...
    fullfile(AD_LOC,   'GenSubs.f90'                ), ... 
    fullfile(AD_LOC,   'AeroSubs.f90'               ), ...
    fullfile(AD_LOC,   'AeroDyn.f90'                ), ...
    fullfile(FAST_LOC, 'FAST_Mods.f90'              ), ...
    fullfile(FAST_LOC, 'Noise.f90'                  ), ...
    fullfile(FAST_LOC, 'fftpack.f'                  ), ...
    fullfile(FAST_LOC, 'FFTMod.f90'                 ), ...
    fullfile(FAST_LOC, 'HydroCalc.f90'              ), ...
    fullfile(FAST_LOC, 'AeroCalc.f90'               ), ...
    fullfile(FAST_LOC, 'FAST_IO.f90'                ), ...
    fullfile(FAST_LOC, 'FAST.f90'                   ), ...
    fullfile(FAST_LOC, 'PitchCntrl_ACH.f90'         ), ...
    fullfile(FAST_LOC, 'SetVersion.f90'             ), ...
    fullfile(FAST_LOC, 'UserSubs.f90'               ), ...
    fullfile(FAST_LOC, 'UserVSCont_KP.f90'          ), ...
    fullfile(Sim_LOC , 'FASTSimulink.f90'           ), ...
    fullfile(Sim_LOC,  'FASTGateway.f90'            )  );

%--------------------------------------------------------------------------
% Clean up and display a message.
%--------------------------------------------------------------------------
delete ('*.mod')
disp(['mex completed: ' OutputRootName '.' mexext ' has been created.'])

I have got it to compile now with the Intel Fortran 2015 compiler and the Community version 2013 of Visual Studio on MATLAB 2014b. For some reason when I try to the m file with the mex compilation the compiler doesn’t respect the order of the files. It lists all source files in the correct order from 0 to 38 or something. But when it compiles it counts 0, 1, 10, 11, and so forth for some reason. Need to into that further but most importantly it compiles both with and without the BladedDLL routines.

That’s good news, Andre.

I am currently writing the FAST v8 S-Function for Simulink, and it will be a lot easier to compile. :slight_smile:

Will it also compile with gfortran? I updated gfortran in mingw32 and now the BladedDLL version compiles without errors and warnings but it still won’t run neither S-Func or the pure FORTRAN version. It crashes with if I use a DISCON.dll that is compiled with Intel FORTRAN. If I use a gfortran compiled DISCON.dll it just gives up.

C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\NREL5MWTest\NRELOffshrBsline5MW
_Onshore>FAST_gwin32.exe [/h] NRELOffshrBsline5MW_Onshore.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.

  ADAMS dataset file 'NRELOffshrBsline5MW_Onshore_ADAMS.adm' created.
  ADAMS command file 'NRELOffshrBsline5MW_Onshore_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  ffffffff

I’m trying to debug it a bit more. I get this:

At line 6412 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vecresult'
 of procedure 'crossprod'
At line 6412 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector2' o
f procedure 'crossprod'
At line 6413 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vecresult'
 of procedure 'crossprod'
At line 6413 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector2' o
f procedure 'crossprod'
At line 6438 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector2' o
f procedure 'crossprod'
At line 6450 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector2' o
f procedure 'crossprod'
At line 6451 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector2' o
f procedure 'crossprod'
At line 6452 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector2' o
f procedure 'crossprod'
At line 6453 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector2' o
f procedure 'crossprod'
At line 6476 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector1' o
f procedure 'crossprod'
At line 6476 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector2' o
f procedure 'crossprod'
At line 6477 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector1' o
f procedure 'crossprod'
At line 6624 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector1' o
f procedure 'crossprod'
At line 6635 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector1' o
f procedure 'crossprod'
At line 6745 of file C:/Users/AFE/Documents/DEIF/FAST_v7/FAST_Install/Source/FAS
T.f90
Fortran runtime warning: An array temporary was created for argument 'vector2' o
f procedure 'crossprod'

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

Backtrace for this error:
#0  ffffffff

Are you using a DLL with a different size avrSWAP array? Some versions of the DLL have R=145 instead of R=85 (which is what the interface provided with FAST v7 uses). Seg faults often occur when you try to go beyond the end of an array.

See if you can figure out if it’s crashing inside the DLL or in FAST.

I’m using the DLL’s that come with the various 5 MW test files. I looked into the code and they don’t seem go beyond R=85. If I rebuild the DLL with gfortran FAST aborts the calculation when reaching the DLL and writing it can’t open the file.

Do you mean it can’t open (or find) the DLL file? If so, is the DLL in your working directory? Is it the same addressing scheme as the executable (i.e., 32-bit or 64-bit applications)

It can find the DLL but it can’t open it. The DLL is also 32-bit as the build gfortran executable. Here is how I buils the executable and the DISCON.dll.

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/BladedDLLInterface_v7_gfortran.f90 -o Obj_win32/BladedDLLInterface_v7_gfortr
an.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 -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/BladedDLLI
nterface_v7_gfortran.obj  Obj_win32/UserSubs.obj  Obj_win32/UserVSCont_KP.obj  O
bj_win32/AeroCalc.obj  Obj_win32/SetVersion.obj  Obj_win32/FAST_Prog.obj

C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Compiling>gfortran -O2 -m32 -fb
acktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real
-8 -c DISCON.f90

C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Compiling>gfortran -O2 -m32 -fb
acktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real
-8 -shared -o DISCON.dll DISCON.o

C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\Compiling>

Now if I try to run the appropriate fst I get

C:\Users\AFE\Documents\DEIF\FAST_v7\FAST_Install\NREL5MWTest\NRELOffshrBsline5MW
_ITIBarge4>FAST_gwin32.exe [/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.


  The procedure DISCON in file DISCON.dll could not be loaded.

  Aborting FAST.


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

Did you modify your DISCON.f90 so that gfortran exports the subroutine? I think the samples in FAST 7 are set up only for Intel Fortran. Here’s some code that works for both compilers (note the line that begins with !GCC$):

[code]SUBROUTINE DISCON ( avrSWAP, aviFAIL, accINFILE, avcOUTNAME, avcMSG ) BIND (C, NAME=‘DISCON’)
!DEC$ ATTRIBUTES DLLEXPORT :: DISCON

! This Bladed-style DLL controller
! Modified by B. Jonkman to conform to ISO C Bindings (standard Fortran 2003) and
! compile with either gfortran or Intel Visual Fortran (IVF)
! DO NOT REMOVE or MODIFY LINES starting with “!DEC$” or “!GCC$”
! !DEC$ specifies attributes for IVF and !GCC$ specifies attributes for gfortran

USE, INTRINSIC :: ISO_C_Binding

IMPLICIT NONE
!GCC$ ATTRIBUTES DLLEXPORT :: DISCON

! Passed Variables:

REAL(C_FLOAT), INTENT(INOUT) :: avrSWAP (*)
INTEGER(C_INT), INTENT(INOUT) :: aviFAIL
CHARACTER(KIND=C_CHAR), INTENT(IN) :: accINFILE (NINT(avrSWAP(50)))
CHARACTER(KIND=C_CHAR), INTENT(IN) :: avcOUTNAME(NINT(avrSWAP(51)))
CHARACTER(KIND=C_CHAR), INTENT(INOUT) :: avcMSG (NINT(avrSWAP(49)))

! some code here

END SUBROUTINE DISCON [/code]
The rest of that routine is in the FAST v8 archive, under CertTest\5MW_Baseline\ServoData\Source.

No I haven’t changed the anything in the DISCON.dll’s but I will look into them now.

I noticed the Intel FORTRAN things in the DISCON subroutine. I fixed those to work with gfortran and now my bladedDLL version compiled with gfortran works with the fst from NRELOffshrBsline archives.

Many thanks for the hint. Now I just need MATLAB to build the mexw32 with gfortran.

Currently I have gotten this far with building the mexw32 with gfortran

C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0xf6): undefined reference to `__gfortran_string_len_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x114): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x142): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x156): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x184): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x190): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x1a3): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x1cd): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x1d9): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x210): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x221): undefined reference to `__gfortran_string_len_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x23b): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x265): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x282): undefined reference to `_memcpy' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x2a3): undefined reference to `_memset' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x2cc): undefined reference to `__gfortran_string_len_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x2e6): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x315): undefined reference to `_memcpy' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj:SetVersion.f90:(.text+0x336): undefined reference to `_memset' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x61): undefined reference to `__gfortran_string_len_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x7f): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xa9): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xb3): undefined reference to `_LoadLibraryA@4' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xc4): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xeb): undefined reference to `__gfortran_string_len_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x109): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x133): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x143): undefined reference to `_GetProcAddress@8' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x155): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x18f): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1a6): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1d7): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1e7): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1fa): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x22a): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x236): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x23b): undefined reference to `_GetLastError@0' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x24b): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x291): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x2af): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x2e7): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x2f7): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x30b): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x317): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x34b): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x381): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x398): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x3c9): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x3d9): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x3ec): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x41c): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x428): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x42d): undefined reference to `_GetLastError@0' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x43d): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x477): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x495): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x4cd): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x4d9): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x4ed): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x4f9): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x9da): undefined reference to `_lroundf' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x9f1): undefined reference to `_lroundf' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xa63): undefined reference to `_lroundf' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xaa7): undefined reference to `_lroundf' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xb6b): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xb82): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xbb3): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xbcb): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xbe2): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xc12): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xc1e): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xc35): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xc65): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xc71): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xc88): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xcb8): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xcc4): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xcfb): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xdb7): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xe5c): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xe73): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xea4): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xebc): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xed3): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xf03): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xf0f): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xf26): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xf56): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xf62): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xf79): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xfa9): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0xfb5): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x103a): undefined reference to `_lroundf' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1050): undefined reference to `_lroundf' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1066): undefined reference to `_lroundf' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1092): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x10a9): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x10da): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x10f2): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1109): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1139): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1145): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x115c): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x118c): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1198): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x11af): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x11df): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x11eb): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x121b): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1232): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1263): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x127b): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1292): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x12c2): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x12ce): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x12e5): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1315): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1321): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1338): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1368): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1374): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x13f6): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x140d): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x143e): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1456): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x146d): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x149d): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x14a9): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x14c0): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x14f0): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x14fc): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1513): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1543): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x154f): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x15f4): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x16e1): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x17d8): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x539): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x164b): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x1767): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj:BladedDLLInterface.f90:(.text+0x189c): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xa3): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x115): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x1e6): undefined reference to `__gfortran_date_and_time' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x1f2): undefined reference to `__gfortran_cpu_time_4' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x330): undefined reference to `_memcpy' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x446): undefined reference to `_realloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x50e): undefined reference to `_realloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x5fc): undefined reference to `_realloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x79c): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x7f1): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x849): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x903): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x97d): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xac3): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xad3): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xb58): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xb7e): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xbac): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xbb8): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xbc4): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xbf2): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xbfe): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xc1a): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xc34): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xc68): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xc7c): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xc88): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xca4): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xcb8): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xcf7): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xd77): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xd99): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xdbf): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0xdc9): more undefined references to `_malloc' follow 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x1011): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x1029): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x103d): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x104d): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj:FASTSimulink.f90:(.text+0x1064): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x3b): undefined reference to `_mexgetvariableptr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x98): undefined reference to `_mexgetvariableptr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xf5): undefined reference to `_mexgetvariableptr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x201): undefined reference to `_mxcreatedoublematrix' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x20b): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x24d): undefined reference to `_mxcopyreal8toptr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x27d): undefined reference to `_mxcreatedoublematrix' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x2b1): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x2cd): undefined reference to `_mxcopyptrtoreal8' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x2ef): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x30b): undefined reference to `_mxcopyptrtoreal8' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x32d): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x349): undefined reference to `_mxcopyptrtoreal8' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x380): undefined reference to `_mexgetvariableptr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x39d): undefined reference to `_mxgetm' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x3ae): undefined reference to `_mxgetn' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x3de): undefined reference to `_mxgetstring' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x40f): undefined reference to `_mexgetvariableptr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x472): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x4ac): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x4c3): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x4f8): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x504): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x518): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x52b): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x55b): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x567): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x573): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x5a9): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x5c7): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x5ff): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x60b): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x61f): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x62b): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x642): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x677): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x683): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x74e): undefined reference to `_mxgetm' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x75b): undefined reference to `_mxgetn' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x7a2): undefined reference to `_mxgetscalar' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x7cf): undefined reference to `_mxgetm' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x7dc): undefined reference to `_mxgetn' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x82a): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x837): undefined reference to `_mxgetm' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x844): undefined reference to `_mxgetn' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x894): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x8f8): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x914): undefined reference to `_mxcopyptrtoreal8' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x9a1): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x9bd): undefined reference to `_mxcopyreal8toptr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x9e8): undefined reference to `_mxcopyptrtoreal8' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x9f7): undefined reference to `_mxgetm' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xa04): undefined reference to `_mxgetn' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xa4a): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xa77): undefined reference to `_mxcopyptrtoreal8' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xabf): undefined reference to `_mxcreatedoublematrix' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xac9): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xaf6): undefined reference to `_mxcopyreal8toptr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xb21): undefined reference to `_mxcreatedoublematrix' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xb4e): undefined reference to `_mxcreatedoublematrix' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xb77): undefined reference to `_mxcreatedoublematrix' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xbdb): undefined reference to `_mxcopyptrtoreal8' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xbea): undefined reference to `_mxgetm' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xbf7): undefined reference to `_mxgetn' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xc3f): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xc60): undefined reference to `_mxcopyptrtoreal8' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xcb0): undefined reference to `_mxcreatedoublematrix' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xcba): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xcdb): undefined reference to `_mxcopyreal8toptr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xd06): undefined reference to `_mxcreatedoublematrix' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xd10): undefined reference to `_mxgetpr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xd31): undefined reference to `_mxcopyreal8toptr' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xd5c): undefined reference to `_mxcreatedoublematrix' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xda0): undefined reference to `_mexErrMsgTxt@4' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xdc5): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xe05): undefined reference to `__gfortran_string_trim' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xe1c): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xe55): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xe69): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xe7d): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xe90): undefined reference to `_malloc' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xeca): undefined reference to `__gfortran_concat_string' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xeda): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0xf12): undefined reference to `_free' 
C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj:FASTGateway.f90:(.text+0x6a7): undefined reference to `_free' 
collect2.exe: error: ld returned 1 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 -O2 C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\DoubPrec.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SysMatlab.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\NWTC_IO.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\NWTC_Num.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\NWTC_Aero.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\ModMesh.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\NWTC_Library.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SharedInflowDefs.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\HHWind.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FFWind.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\HAWCWind.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FDWind.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\CTWind.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\UserWind.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\InflowWindMod.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SharedTypes.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\AeroMods.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\GenSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\AeroSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\AeroDyn.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FAST_Mods.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\Noise.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\fftpack.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FFTMod.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\HydroCalc.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\AeroCalc.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FAST_IO.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FAST.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\SetVersion.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\BladedDLLInterface.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\UserSubs.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\UserVSCont_KP.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTSimulink.obj C:\Users\AFE\AppData\Local\Temp\mex_g8cWlG\FASTGateway.obj -lflibmx -lflibmex -lflibmat 
 
  C:\PROGRA~2\MATLAB\R2014B\BIN\MEX.PL: Error: Link of 'FAST_SFunc.mexw32' failed. 
 
Unable to complete successfully.

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

this is how the bat file looks:

@echo off
rem C:\Users\AFE\AppData\Roaming\MathWorks\MATLAB\R2014b\mexopts.bat
rem Generated by gnumex.m script in C:\gnumex
rem gnumex version: 2.06
rem Compile and link options used for building MEX etc files with
rem the Mingw/Cygwin tools.  Options here are:
rem Gnumex, version 2.06           
rem MinGW linking                  
rem Mex (*.dll) creation           
rem Libraries regenerated now      
rem Language: Fortran 95 (gfortran)
rem Optimization level: -O2        
rem StorageVersion: 1.0
rem C++keyName: GNU C++
rem C++keyManufacturer: GNU
rem C++keyLanguage: C++
rem C++keyVersion:
rem C++keyFileName: GNUMEXOPTS.bat
rem Matlab version 8.4
rem
set GCCINSTALLDIR=C:\TDM-GC~1\bin
set MATLAB=C:\PROGRA~2\MATLAB\R2014b
set GM_PERLPATH=C:\PROGRA~2\MATLAB\R2014b\sys\perl\win32\bin\perl.exe
set GM_UTIL_PATH=C:\gnumex
set PATH=C:\TDM-GC~1\bin;%PATH%
set PATH=%PATH%;C:\Cygwin\usr\local\gfortran\libexec\gcc\i686-pc-cygwin\4.3.0
set LIBRARY_PATH=C:\TDM-GC~1\lib
set G95_LIBRARY_PATH=C:\TDM-GC~1\lib
set MW_TARGET_ARCH=win32
rem
rem precompiled library directory and library files
set GM_QLIB_NAME=C:\Users\AFE\AppData\Roaming\MATHWO~1\MATLAB\R2014b\gnumex
rem
rem directory for .def-files
set GM_DEF_PATH=C:\Users\AFE\AppData\Roaming\MATHWO~1\MATLAB\R2014b\gnumex
rem
rem Type of file to compile (mex or engine)
set GM_MEXTYPE=mex
rem
rem Language for compilation
set GM_MEXLANG=f95
rem
rem File for exporting mexFunction symbol
set GM_MEXDEF=C:\Users\AFE\AppData\Roaming\MATHWO~1\MATLAB\R2014b\gnumex\gfortmex.def
rem
set GM_ADD_LIBS=-lflibmx -lflibmex -lflibmat
rem
rem compiler options; add compiler flags to compflags as desired
set NAME_OBJECT=-o
set COMPILER=gfortran
set COMPFLAGS=-c -DMATLAB_MEX_FILE -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-length-none -fdefault-real-8
set OPTIMFLAGS=-O2
set DEBUGFLAGS=-g
rem
rem NB Library creation commands occur in linker scripts
rem but LIBLOC is provided for compatibility with
rem mex.getCompilerConfigurations
rem
rem Linker parameters
set LIBLOC=%MATLAB%\extern\lib\win32\microsoft
set LINKER=%GM_PERLPATH% %GM_UTIL_PATH%\linkmex.pl
set LINKFLAGS=-m32 -fbacktrace -fdefault-real-8 
rem /dll /export:MEXFUNCTION /LIBPATH:%LIBLOC% libmx.lib libmex.lib libmat.lib /implib:%LIB_NAME%.x %OUTDIR%%MEX_NAME%%MEX_EXT%.map /NOLOGO  /manifest /INCREMENTAL:NO
set LINKOPTIMFLAGS=-s -O2
set LINKDEBUGFLAGS=-g  -Wl,--image-base,0x28000000\ 
rem /debug /PDB:%OUTDIR%%MEX_NAME%%MEX_EXT%.pdb
set LINKFLAGS= -LC:\Users\AFE\AppData\Roaming\MATHWO~1\MATLAB\R2014b\gnumex
set LINK_FILE=
set LINK_LIB=
set NAME_OUTPUT=-o %OUTDIR%%MEX_NAME%.mexw32
set RSP_FILE_INDICATOR=@
rem
rem Resource compiler parameters
set RC_COMPILER=%GM_PERLPATH% %GM_UTIL_PATH%\rccompile.pl  -o %OUTDIR%mexversion.res
set RC_LINKER=