How to setup Visual Studio 2012 to work with Matlab compiler? (Test checkout of feature 'Compiler' failed.)

2 ビュー (過去 30 日間)
Robert
Robert 2013 年 11 月 18 日
回答済み: Zhongxian pan 2013 年 12 月 9 日
I get this message when I try to compile (anything): >> mcc -m logodemo.m Error using mcc Test checkout of feature 'Compiler' failed.
I did all this: mbuild -setup
Welcome to mbuild -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 shared libraries or COM components:
Would you like mbuild to locate installed compilers [y]/n? n
Select a compiler: [1] Microsoft Software Development Kit (SDK) 7.1 [2] Microsoft Visual C++ 2008 SP1 [3] Microsoft Visual C++ 2010 [4] Microsoft Visual C++ 2012
[0] None
Compiler: 4
Your machine has a Microsoft Visual C++ 2012 compiler located at C:\Program Files (x86)\Microsoft Visual Studio 11.0. Do you want to use this compiler [y]/n? y
Please verify your choices:
Compiler: Microsoft Visual C++ 2012 Location: C:\Program Files (x86)\Microsoft Visual Studio 11.0
Are these correct [y]/n? y
************************************************************************** Warning: Applications/components generated using Microsoft Visual C++ 2012 require that the Microsoft Visual Studio 2012 run-time libraries be available on the computer used for deployment. To redistribute your applications/components, be sure that the deployment machine has these run-time libraries. **************************************************************************
Trying to update options file: C:\Users\ShanTuo\AppData\Roaming\MathWorks\MATLAB\R2013b\compopts.bat From template: C:\PROGRA~1\MATLAB\R2013b\bin\win64\mbuildopts\msvc110compp.bat
Done . . .
>> license('checkout','Compiler')
ans =
1
>> 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:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler: [1] Microsoft Visual C++ 2012 in C:\Program Files (x86)\Microsoft Visual Studio 11.0
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Visual C++ 2012 Location: C:\Program Files (x86)\Microsoft Visual Studio 11.0
Are these correct [y]/n? y
************************************************************************* Warning: MEX-files generated using Microsoft Visual C++ 2012 require that Microsoft Visual Studio 2012 run-time libraries be available on the computer they are run on. If you plan to redistribute your MEX-files to other MATLAB users, be sure that they have the run-time libraries. *************************************************************************
Trying to update options file: C:\Users\ShanTuo\AppData\Roaming\MathWorks\MATLAB\R2013b\mexopts.bat From template: C:\PROGRA~1\MATLAB\R2013b\bin\win64\mexopts\msvc110opts.bat
Done . . .

回答 (1 件)

Zhongxian pan
Zhongxian pan 2013 年 12 月 9 日
Hi, Robert! I believe your MATLAB is a 64-bit version and your VS is a 32-bit version. I don't know how to connect 2 different version. But I suggest your to re-install one of the two to keep the bits same. In other words, you should install a 32-bit version MATLAB or install a 64-bit VS~

カテゴリ

Help Center および File ExchangeC Shared Library Integration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by