If the script can’t find the link command, that means the path/include/lib variables in your options .bat file are not set properly. I have found the easiest way to fix this is to copy the variables that the Intel Command Prompt window sets for you.
Open the Intel command prompt (see FAST v7 compiling instructions for descriptions of where you can find this on your computer). In that command window that opens, change to a directory where you have write permissions, then type this:
echo SET TmpPath=%PATH%; >> opts.out
echo SET TmpIncl=%INCLUDE%; >> opts.out
echo SET TmpLib=%LIB%; >> opts.out
This will append three lines to a file called opts.out (you can name it whatever you want, just make sure you don’t overwrite anything important).
Open the opts.out file, copy those three lines, and then paste them into your FortranOptionsFile (the batch script specified in make_FAST_SFunc.m) before the three lines that start with
Now, take a close look at the PATH, INCLUDE, and LIB variables specified in the FortranOptionsFile. Each entry in those lines is separated by a semicolon; Remove each entry in those three lines that doesn’t contain the word “MATLAB”. In my case, that leaves me with:
Then, I add the paths that the Intel Command Window gave me, so my final section of code will look something like this:
SET TmpPath=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Progra…
SET TmpIncl=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 1…
SET TmpLib=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 12.0\V…
[/code]Note that I didn’t copy the full TmpPath, TmpIncl, and TmpLib variables here because they are very long. You should obviously copy the full set of paths.