OC3 blade pitch control problem & its errors

Dear All,

I couldn’t install matlab 32bit on my machine, so started to compile mexw64 myself.
I have installed IVF 11(32bit) and visual studio 2005 on my win 7 (64bit) machine.
I changed “make_FAST_SFunc.m” file as below:
FortranOptionsFile = ‘intelf11msvs2005opts.bat’;
OutputRootName = ‘FAST_SFunc’;
NWTC_LIB = ‘C:\Design Codes\NWTC_Lib_v1.03.01\Source’;
WIND_LOC = ‘C:\Design Codes\AeroDyn\Source\InflowWind\Source’;
AD_LOC = ‘C:\Design Codes\AeroDyn\Source’;
FAST_LOC = ‘C:\Design Codes\FAST\Source’;
Sim_LOC = ‘C:\Design Codes\FAST\Simulink\Source’;
mex(‘-v’ , … %verbose
‘-f’, FortranOptionsFile , … %file containing fortran options
‘-output’, OutputRootName , … %name of the resulting mex function
fullfile(NWTC_LIB, ‘DoubPrec.f90’ ), …
fullfile(NWTC_LIB, ‘SysMatlab.f90’ ), …
fullfile(NWTC_LIB, ‘NWTC_IO.f90’ ), …
fullfile(NWTC_LIB, ‘NWTC_Num.f90’ ), …
fullfile(NWTC_LIB, ‘NWTC_Aero.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, ‘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’ ) );
delete (‘*.mod’)
disp([‘mex completed: ’ OutputRootName ‘.’ mexext ’ has been created.’])

Also create the intelf11msvs2005opts batch file include:
set MATLAB=C:\Program Files\MATLAB\R2010b
SET IFORT_COMPILER11=C:\Program Files (x86)\Intel\Compiler\11.0\066\fortran
set VS80COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools
set LINKERDIR=%VS80COMNTOOLS%....
set PATH=%IFORT_COMPILER11%\Bin\ia32;%LINKERDIR%\VC\BIN;%LINKERDIR%\Common7\Tools;%LINKERDIR%\Common7\Tools\bin;%LINKERDIR%\Common7\IDE;%LINKERDIR%\SDK\v2.0\bin;%PATH%
set INCLUDE=%IFORT_COMPILER11%\Include;%IFORT_COMPILER11%\Include\ia32;%LINKERDIR%\VC\ATLMFC\INCLUDE;%LINKERDIR%\VC\INCLUDE;%LINKERDIR%\VC\PlatformSDK\include;%LINKERDIR%\SDK\v2.0\include;%INCLUDE%
set LIB=%IFORT_COMPILER11%\Lib\ia32;%LINKERDIR%\VC\ATLMFC\LIB\AMD64;%LINKERDIR%\VC\LIB\AMD64;%LINKERDIR%\VC\PlatformSDK\lib\AMD64;%LINKERDIR%\SDK\v2.0\lib\AMD64;%MATLAB%\extern\lib\win64;%LIB%
set MW_TARGET_ARCH=win64
set COMPILER=ifort
set COMPFLAGS= /Qprec “/I%MATLAB%/extern/include” -c -nologo -DMATLAB_MEX_FILE /MD /fp:source /assume:bscc /assume:byterecl /traceback /real_size:64 /Qzero /Qsave
set OPTIMFLAGS=-Ox -DNDEBUG
set DEBUGFLAGS=/Z7
set NAME_OBJECT=/Fo
set LIBLOC=%MATLAB%\extern\lib\win64\microsoft
set LINKER=link
set LINKFLAGS=/DLL /EXPORT:MEXFUNCTION /LIBPATH:“%LIBLOC%” libmx.lib libmex.lib libmat.lib /implib:“%LIB_NAME%.x” /MAP:“%OUTDIR%%MEX_NAME%%MEX_EXT%.map” /NOLOGO /INCREMENTAL:NO
set LINKOPTIMFLAGS=
set LINKDEBUGFLAGS=/debug /PDB:“%OUTDIR%%MEX_NAME%%MEX_EXT%.pdb”
set LINK_FILE=
set LINK_LIB=
set NAME_OUTPUT=/out:“%OUTDIR%%MEX_NAME%%MEX_EXT%”
set RSP_FILE_INDICATOR=@
set RC_COMPILER=rc /fo “%OUTDIR%mexversion.res”
set RC_LINKER=
set POSTLINK_CMDS=del “%OUTDIR%%MEX_NAME%%MEX_EXT%.map”
set POSTLINK_CMDS1=del “%LIB_NAME%.x” “%LIB_NAME%.exp”
set POSTLINK_CMDS2=mt -outputresource:“%OUTDIR%%MEX_NAME%%MEX_EXT%”;2 -manifest “%OUTDIR%%MEX_NAME%%MEX_EXT%.manifest”
set POSTLINK_CMDS3=del “%OUTDIR%%MEX_NAME%%MEX_EXT%.manifest”

Then run the “make_FAST_SFunc.m” file in matlab command window and tons of lines of commands passed as below:
Annexed File
command line .txt (79 KB)
And at the end, the following error appeared in matlab command line:
??? Error using ==> mex at 208
Unable to complete successfully.
Error in ==> make_FAST_SFunc at 65
mex(‘-v’ , … %verbose

I myself think I set compiler parameters wrongly, or the IVF 32bit dont work with matlab2010b 64bit.
Any way:
Any help to fix this problem to create mexw64 will be appreciable.

Thanks
Mehdi