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

In matlab; Error using mex LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'


In Matlab2015a, When i use "mex -output" command with some parameter, i get this error:

Building with 'Microsoft Visual C++ 2013 Professional'. Error using mex LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'

I khow that this error is related with "Intel Composer XE 2013", but i dont khow how can i solve it. there is some 'ifconsol.lib' in installed "Intel Composer XE 2013" folders in program files. I use "Intel Composer XE 2013" on Windows 10 64bit.

I ask this question before in stackoverflow and i dont get any answer.



0 Kudos
2 Replies
Black Belt Retired Employee

You have to somehow tell Matlab to add the Intel compiler LIB folder to its link option. The best way to do this is to use the Intel compiler command prompt shortcut to establish the compiler environment. Then from there invioke the Matlab environment script.

Black Belt

I have often found that the Matlab Mex building script will work only with the same Matlab-IFort combination that it was written for. However, it is much easier and fail-safe to build the Mex file in an IFort command window. All that you have to do is to add the Matlab Include and Lib directories to the INCLUDE and LIB environmental variables.