Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28528 Discussions

Linker error Matlab Mex + IVF Composer 2011 + Microsoft Visual Studio Integratable Shell 2008

SarahZ
Beginner
725 Views
I just upgraded from a trial version of Intel Visual Fortran, with Microsoft visual studio 2010,
to a full version with the Microsoft Visual C++ 2008 Shell linker. I am using this for a
matlab mex function. According to the matlab site, this configuration is compatible with my matlab
version R2011b (I have the first IVF 2011 release, which has the 12.0 compiler.) However, since I
switched to the integratable shell version, I get the following linker error when I try to compile.
'link' is not recognized as an internal or external command,
operable program or batch file.
C:\\PROGRA~1\\MATLAB\\R2011B\\BIN\\MEX.PL: Error: Link of 'FAST_SFunc.mexw32' failed.
Error using mex (line 206)
Unable to complete successfully.
Error in make_FAST_SFunc (line 65)
mex('-v' , ...
%verbose
'link' is not recognized as an internal or external command,operable program or batch file. C:\\PROGRA~1\\MATLAB\\R2011B\\BIN\\MEX.PL: Error: Link of 'FAST_SFunc.mexw32' failed.Error using mex (line 206)Unable to complete successfully.
Error in make_FAST_SFunc (line 65)mex('-v' , ...%verbose
At the time I did the upgrade, I fully uninstalled the previous version, as well as the microsoft visual studio 2010. I am sure that IVF is configured to run with the integratable shell.. and matlab is able to recognize this
compiler. It seems the .bat configuration file does not work out of the box. I think there may be some discrepancy in the path variables.. I have attatched the configuration .bat file from matlab, and the relevant
environment variables are shown below.
C:\\Users\\szalusky>SET
CommonProgramFiles=C:\\Program Files\\Common Files
IFORT_COMPILER12=C:\\Program Files\\Intel\\ComposerXE-2011\\
INTEL_LICENSE_FILE=C:\\Program Files\\Common Files\\Intel\\Licenses
PATH=C:\\Program Files\\Intel\\ComposerXE-2011\\redist\\ia32\\mkl;C:\\Program Files\\Int
el\\ComposerXE-2011\\redist\\ia32\\mpirt;C:\\Program Files\\Intel\\ComposerXE-2011\\redi
st\\ia32\\compiler;C:\\Program Files\\Intel\\ComposerXE-2011\\compiler\\lib;C:\\Program
Files\\Common Files\\Microsoft Shared\\VSA\\9.0\\VsaEnv;C:\\szalusky\\Design_Codes\\Batc
h;C:\\Batch;C:\\Program Files\\MATLAB\\R2011b\\bin;c:\\Program Files\\Microsoft SQL Ser
ver\\100\\Tools\\Binn\\;c:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
VSSHELL2008INSTALLDIR=C:\\Program Files\\Microsoft Visual Studio 9.0\\
I am running on 32bit windows. I already tried creating the variable VSINSTALLDIR which points to the VSSHELL2008INSTALLDIR. Any help/feedback would be very appreciated! Has anyone been able to successfully use thisconfiguration in matlab r2011b? Does anyone have suggestions on modifying
the .bat? Thank you very much in advance!!
Sarah
0 Kudos
1 Reply
SarahZ
Beginner
725 Views
Problem fixed.. For future reference the intelf12msvs2008shellopts.bat needs VSINSTALLDIR modified to
SET VSINSTALLDIR=%VSSHELL2008INSTALLDIR%
Several other compiler flags needed to be modified in addition for my application.
0 Kudos
Reply