2015-02-01 6 views
0

Я пытаюсь использовать файл .F90, вызывая его из m-файла. Из небольшого числа, которое я прочитал, я должен использовать эту настройку mex, чтобы все наладилось. Я установил Intel Parallel Studio 2015 и Windows SDK 8. Теперь из приведенной ниже ошибки я подозреваю, что MatLab не ищет более свежие версии. В любом случае, как я могу настроить работу mex?Fortran in MatLab - Ошибка в mex Setup

Вот код ошибки:

mex -setup -v 
Verbose mode is on. 
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft SDK 7.1 (C)' ... 
... Looking for environment variable 'ICPP_COMPILER12' ...No. 
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft SDK 7.1 (C)'. 
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2008 (C)' ... 
... Looking for environment variable 'ICPP_COMPILER12' ...No. 
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2008 (C)'. 
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2010 (C)' ... 
... Looking for environment variable 'ICPP_COMPILER12' ...No. 
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2010 (C)'. 
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft SDK 7.1' ... 
... Looking for environment variable 'ICPP_COMPILER14' ...No. 
... Looking for environment variable 'ICPP_COMPILER13' ...No. 
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft SDK 7.1'. 
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2010 (C)' ... 
... Looking for environment variable 'ICPP_COMPILER14' ...No. 
... Looking for environment variable 'ICPP_COMPILER13' ...No. 
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2010 (C)'. 
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2012 (C)' ... 
... Looking for environment variable 'ICPP_COMPILER14' ...No. 
... Looking for environment variable 'ICPP_COMPILER13' ...No. 
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2012 (C)'. 
... Looking for compiler 'Microsoft Visual C++ 2008 (C)' ... 
... Looking for environment variable 'VS90COMNTOOLS' ...No. 
Did not find installed compiler 'Microsoft Visual C++ 2008 (C)'. 
... Looking for compiler 'Microsoft Visual C++ 2010 (C)' ... 
... Looking for environment variable 'VS100COMNTOOLS' ...No. 
Did not find installed compiler 'Microsoft Visual C++ 2010 (C)'. 
... Looking for compiler 'Microsoft Visual C++ 2012 (C)' ... 
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No. 
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No. 
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No. 
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No. 
Did not find installed compiler 'Microsoft Visual C++ 2012 (C)'. 
... Looking for compiler 'Microsoft Visual C++ 2013 Professional (C)' ... 
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No. 
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No. 
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\'). 
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe' ...No. 
Did not find installed compiler 'Microsoft Visual C++ 2013 Professional (C)'. 
... Looking for compiler 'Microsoft Windows SDK 7.1 (C)' ... 
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...No. 
Did not find installed compiler 'Microsoft Windows SDK 7.1 (C)'. 

Спасибо.

EDIT: Я установил Windows SDK 7.1 и удалось запустить mex -setup:

mex -setup 
MEX configured to use 'Microsoft Windows SDK 7.1 (C)' for C language compilation. 
Warning: The MATLAB C and Fortran API has changed to support MATLAB 
    variables with more than 2^32-1 elements. In the near future 
    you will be required to update your code to utilize the 
    new API. You can find more information about this at: 
    http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html. 

Однако при нажатии на выбор Fortran языка, я получаю:

To choose a different language, select one from the following: 
mex -setup C++ 
mex -setup FORTRAN 
Error using mex 
No supported compiler or SDK was found. For options, visit 
http://www.mathworks.com/support/compilers/R2014b/win64.html. 
+0

Какая версия matlab вы используете? Кажется, урон SDK 7.1, проверьте документацию на совместимый компилятор. – Daniel

+0

MatLab R 2014b. – user191919

+0

Скорее всего, вы используете версию MATLAB, которая не поддерживает ваш компилятор. По внешнему виду ваш компилятор ** слишком новый **. Как сказал Дэниел, какую версию MATLAB вы используете? Список поддерживаемых компиляторов для каждой версии MATLAB. – rayryeng

ответ

2

Вы должны установить Windows SDK 7.1 или один из других компиляторов, перечисленных in the documentation. Обратите внимание на различия между 32 бит и 64 бит.

+0

Довольно много, что я сказал! + 1. – rayryeng

+0

Я получаю сообщение об ошибке при попытке установить SDK 7.1, возможно, потому, что у меня Windows 8 (duh). Вы видите какой-то выход? – user191919

+0

@ user191919 - http://www.mathworks.com/matlabcentral/answers/101105-how-do-i-install-microsoft-windows-sdk-7-1 – rayryeng

Смежные вопросы