Error in mex (line 206) please help

2 ビュー (過去 30 日間)
Mahua
Mahua 2013 年 9 月 4 日
回答済み: Steve 2015 年 1 月 27 日
>> mex -setup
Welcome to mex -setup. This utility will help you set up a default compiler. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2013a/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? y
No supported SDK or compiler was found on this computer. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2013a/win64.html
Error using mex (line 206) Unable to complete successfully.
>> mex -setup
Welcome to mex -setup. This utility will help you set up a default compiler. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2013a/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler: [1] Intel C++ 13.0 (with Microsoft Software Development Kit (SDK) linker) [2] Intel C++ 13.0 (with Microsoft Visual C++ 2010 linker) [3] Intel C++ 13.0 (with Microsoft Visual C++ 2012 linker) [4] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker) [5] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker) [6] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker) [7] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker) [8] Intel Visual Fortran 13 (with Microsoft Software Development Kit (SDK) linker) [9] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2010 linker) [10] Intel Visual Fortran 13.0 (with Microsoft Visual C++ 2012 linker) [11] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker) [12] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker) [13] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker) [14] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker) [15] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker) [16] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker) [17] Microsoft Software Development Kit (SDK) 7.1 [18] Microsoft Visual C++ 2005 SP1 [19] Microsoft Visual C++ 2008 SP1 [20] Microsoft Visual C++ 2010 [21] Microsoft Visual C++ 2012
[0] None
Compiler: 17
Warning: The default location for Microsoft Software Development Kit (SDK) compiler is: "C:\Program Files (x86)\Microsoft Visual Studio 10.0" but either that directory does not exist or the configuration is invalid.
Use C:\Program Files (x86)\Microsoft Visual Studio 10.0 anyway [y]/n? y
Please verify your choices:
Compiler: Microsoft Software Development Kit (SDK) 7.1 Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0
Are these correct [y]/n? y
*************************************************************************** Error: The Microsoft Windows Software Development Kit (SDK) installation is incomplete. Please be sure that the .NET Framework is installed correctly before attempting to reinstall the SDK. ***************************************************************************
Error using mex (line 206) Unable to complete successfully.
please suggest what to do.
  2 件のコメント
Walter Roberson
Walter Roberson 2013 年 9 月 4 日
Is it correct to give a Visual Studio directory name for SDK 7.1 ? Does the directory C:\Program Files (x86)\Microsoft Visual Studio 10.0 exist?
Friedrich
Friedrich 2013 年 9 月 4 日
編集済み: Friedrich 2013 年 9 月 4 日
Yes thats correct (assuming a default installation of SDK 7.1). If mex can find it you will see this:
mex -setup
Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2013b/win64.html
Please choose your compiler for building MEX-files:
y
Would you like mex to locate installed compilers [y]/n?
Select a compiler:
[1] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Software Development Kit (SDK) 7.1
Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0
If mex cant find it then something is missing from your SDK installation.

サインインしてコメントする。

採用された回答

Friedrich
Friedrich 2013 年 9 月 4 日
Hi,
run the following code and post the output here:
disp('OS')
disp('=====================================')
system_dependent('getos')
disp('=====================================')
disp('OS version')
disp('=====================================')
system_dependent('getwinsys')
disp('=====================================')
disp('SDK registry check')
disp('=====================================')
try
tmp = winqueryreg('HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' , 'InstallationFolder')
disp('=====================================')
disp('MT.exe')
disp('=====================================')
disp(exist([tmp,'\bin\mt.exe']))
disp('=====================================')
catch
disp('not found')
end
disp('VS 2010 Pro registry check')
disp('=====================================')
try
winqueryreg('HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS','ProductDir')
catch
disp('not found')
end
disp('=====================================')
disp('VS ENV')
disp('=====================================')
env = getenv('VS100COMNTOOLS')
disp('=====================================')
if ~isempty(env)
disp('64bit CL.exe')
disp('=====================================')
disp(exist([env,'\\..\\..\\VC\bin\amd64\cl.exe']))
disp('=====================================')
disp('32bit CL.exe')
disp('=====================================')
disp(exist([env,'\\..\\..\\VC\bin\cl.exe']))
disp('=====================================')
end
  8 件のコメント
Vishnu J
Vishnu J 2014 年 2 月 22 日
Hi I got the same error. This is the output i got..
OS =====================================
ans =
Microsoft Windows 7
=====================================
OS version
=====================================
ans =
Version 6.1 (Build 7600)
=====================================
SDK registry check
=====================================
tmp =
C:\Program Files\Microsoft SDKs\Windows\v7.1\
=====================================
MT.exe
===================================== 2
=====================================
VS 2010 Pro registry check
===================================== not found =====================================
VS ENV
=====================================
env =
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
=====================================
64bit CL.exe
===================================== 0
=====================================
32bit CL.exe
===================================== 2
=====================================
Friedrich
Friedrich 2014 年 2 月 24 日
So the actual 64bit compiler (cl.exe) is not installed. Maybe you run into this Microsoft bug? If not, reinstall the SDK. You can follow this guide.

サインインしてコメントする。

その他の回答 (1 件)

Steve
Steve 2015 年 1 月 27 日
Hi i ran your code. What does this result mean :
OS =====================================
ans =
Microsoft Windows 7
===================================== OS version =====================================
ans =
Version 6.1 (Build 7601: Service Pack 1)
===================================== SDK registry check =====================================
tmp =
C:\Program Files\Microsoft SDKs\Windows\v7.1\
===================================== MT.exe ===================================== 2
===================================== VS 2010 Pro registry check ===================================== not found ===================================== VS ENV =====================================
env =
''
=====================================

カテゴリ

Help Center および File ExchangeWrite C Functions Callable from MATLAB (MEX Files) についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by