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

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

H__Aref
Beginner
861 Views

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.

https://stackoverflow.com/questions/47380268/error-using-mex-link-fatal-error-lnk1104-cannot-open-file-ifconsol-lib

 

 

0 Kudos
2 Replies
Steve_Lionel
Honored Contributor III
861 Views

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.

0 Kudos
mecej4
Honored Contributor III
861 Views

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.

0 Kudos
Reply