필터 지우기
필터 지우기

Help with linking with mex

조회 수: 2 (최근 30일)
Elad Steinberg
Elad Steinberg 2011년 10월 31일
Hello,
I have windows 7 64bit with VS2010 installed with Intel visual fortran 12.0 and matlab 2011b. I ran the mex -setup and configured matlab to work with my fortran version. However, when I try to compile any of the included examples (e.g. timestwo.F) I receive:
mex timestwo.F
'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 'timestwo.mexw64' failed.
Any idea what's wrong and how to fix it?
Elad
  댓글 수: 1
Titus Edelhofer
Titus Edelhofer 2011년 10월 31일
Hi Elad,
as far as I remember, the Intel compiler uses the visual studio linker. Perhaps posting the output of "mex -v timestwo.F" would help to find out the problem.
Titus

댓글을 달려면 로그인하십시오.

채택된 답변

Ora Zyto
Ora Zyto 2011년 11월 1일

Elad,

The MEX options file for Intel Fortran Composer XE 2011 with Microsoft Visual Studio 2010 professional linker points to the wrong installation directory in 64-bit MATLAB 7.13 (R2011b).

Workaround: Edit the intelf12msvs2010opts.bat file:

1. Open $MATLABROOT$\bin\win64\mexopts\intelf12msvs2010opts.bat

2. Edit line 22. Change:

set VSINSTALLDIR=%VS90COMNTOOLS%\..\..

to

set VSINSTALLDIR=%VS100COMNTOOLS%\..\..

3. Save the file

4. Run mex -setup again.

For more information, you can refer to the following bug report: 760950 found at: http://www.mathworks.com/support/bugreports/

Ora

  댓글 수: 1
Elad Steinberg
Elad Steinberg 2011년 11월 1일
Works great!! Thank you very much.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by