Error using mex, LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'

20 次查看(过去 30 天)
I used mex to build a Fortran timestwo.F with Intel Parallel Studio XE 2017 for Fortran and Microsoft Visual Studio 2017. It generated an error: LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'. I set path to both x64 and x32 ifconsol.lib but it didn't work. What should I do to solve the problem? Thanks.

回答(2 个)

Pruthvi Muppavarapu
编辑:Pruthvi Muppavarapu 2019-5-13
Hi Tuan,
The above error might be a result of not having the necessary libraries in the library path. Try running the following commands to add the libraries:
>> fortranRoot = getenv( 'IFORT_COMPILER17');
>> mex('timestwo.F', ['-L' fullfile(fortranRoot, 'compiler', 'lib', 'intel64_win') ]);
Regards,
Pruthvi

Alejandro Pedrozo
Alejandro Pedrozo 2021-7-21
Hi, I had this problem working with the mex function, Microsoft Visual Studio 2010, and Intel composer XE 13. I tried to find the missing libraries in the default folder of the compiler(C:\Program Files (x86)\Intel\Composer XE 2013\Compiler\lib), but they were not there. Fortunately, I have Intel composer XE 11 installed on another computer, its library folder had the missing libraries I needed. So, I copied the required ones from one folder to the other to run the example again. I noted that the error changed since the missing libraries were different this time. I iterated this procedure until the code ran successfully. I hope this information helps you!

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by