Hi Bonnie,
Thank you for your reply.
1.
The first errors are like this
[code]–> ifort /fpp /Qprec /assume:byterecl /traceback /real_size:64 /Qzero /Qsave “/IE:\Program Files\MATLAB\R2013a/extern/include” -c -nologo -DMATLAB_MEX_FILE /fp:source /MD /FoC:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\FASTGateway64.obj /O2 /DNDEBUG -DMX_COMPAT_32 “E:\Control of Wind Turbines\FAST_SFunc Compiling\FAST\Simulink\Source\FASTGateway64.f90”
Contents of C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\mex_tmp.rsp:
C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\DoubPrec.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\SysMatlab.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\NWTC_IO.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\NWTC_Num.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\NWTC_Aero.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\ModMesh.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\NWTC_Library.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\SharedInflowDefs.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\HHWind.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\FFWind.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\HAWCWind.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\FDWind.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\CTWind.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\UserWind.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\InflowWindMod.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\SharedTypes.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\AeroMods.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\GenSubs.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\AeroSubs.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\AeroDyn.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\FAST_Mods.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\Noise.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\fftpack.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\FFTMod.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\HydroCalc.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\AeroCalc.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\FAST_IO.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\FAST.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\PitchCntrl_ACH.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\SetVersion.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\UserSubs.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\UserVSCont_KP.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\FASTSimulink.obj C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\FASTGateway64.obj
→ link /out:“FAST_SFunc.mexw64” /dll /export:MEXFUNCTION /LIBPATH:“E:\Program Files\MATLAB\R2013a\extern\lib\win64\microsoft” libmx.lib libmex.lib libmat.lib /implib:“C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\templib.x” /MAP:“FAST_SFunc.mexw64.map” /NOLOGO /manifest /INCREMENTAL:NO @C:\USERS\CEL\APPDATA\LOCAL\TEMP\MEX_GT~1\MEX_TMP.RSP
Creating library C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\templib.x and object C:\Users\CEL\AppData\Local\Temp\mex_gtzs6q\templib.exp
MSVCRT.lib(crtdll.obj) : error LNK2019: unresolved external symbol __imp_EncodePointer referenced in function pre_c_init
MSVCRT.lib(atonexit.obj) : error LNK2001: unresolved external symbol __imp_EncodePointer
MSVCRT.lib(crtdll.obj) : error LNK2019: unresolved external symbol __imp_DecodePointer referenced in function _CRT_INIT
MSVCRT.lib(atonexit.obj) : error LNK2001: unresolved external symbol __imp_DecodePointer
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_QueryPerformanceCounter referenced in function __security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentProcessId referenced in function __security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentThreadId referenced in function __security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetSystemTimeAsFileTime referenced in function __security_init_cookie
MSVCRT.lib(dllmain.obj) : error LNK2019: unresolved external symbol __imp_DisableThreadLibraryCalls referenced in function DllMain
FAST_SFunc.mexw64 : fatal error LNK1120: 7 unresolved externals
E:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Link of ‘FAST_SFunc.mexw64’ failed.
Error using mex (line 206)
Unable to complete successfully.
Error in make_FAST_SFunc (line 69)
mex(‘-v’
, … %verbose
[/code]
(I did NOT remove the “/MD” in COMFLAGS)
If I remove this flag, the error would be
[code]LIBCMT.lib(wgetcwd.obj) : error LNK2001: unresolved external symbol __imp_GetFullPathNameW
LIBCMT.lib(read.obj) : error LNK2019: unresolved external symbol __imp_ReadConsoleW referenced in function _read_nolock
libirc.lib(tbk_backtrace.obj) : error LNK2019: unresolved external symbol __imp_VirtualQuery referenced in function tbk_getModuleName
FAST_SFunc.mexw64 : fatal error LNK1120: 137 unresolved externals
E:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Link of ‘FAST_SFunc.mexw64’ failed.
[/code]
(There are hundreds of errors, I just pasted a part of them)
- I checked the LIB, INCLUDE and PATH from the Intel 64 Visual Studio command prompt window. Originally they are different from those in the batch file. So I changed them and set the identical with those in the batch file, however, it did not help. Actually it shows the same error as I previously described.
And sorry for the ambiguous “linker direction”, I just mean “LINKERDIR”.
Is there anything else I can check for the compiling process?
Thank you!
Yunchuan Li