Problem using C-compiler in MATLAB. How can I setup my compiler?

1 次查看(过去 30 天)
I recently started to work with MATLAB and I wanted to run a pre-programmed code developed by a colleague. The code makes use of C-code, so I downloaded Microsoft Visual Studio Express 2013 for Windows Desktop.
Instructions of what to do in README.txt.
What I did: I started MATLAB and since the code did not worked, I tried to setup mex. But this gave the following error (see also error.pdf in attachment in attachment): Error using mex No supported compiler or SDK was found. For options, visit http://www.mathworks.com/support/compilers/R2014a/win64.
The code I need to run can also be found in attachment.
How can I resolve these problems?
Many thanks in advance!

回答(1 个)

Tushar Sinha
Tushar Sinha 2014-6-17
From the error message it seems that the C compiler is not setup.
Refer to the "Supported and Compatible Compilers" link below for an information about the supported compilers with "MATLAB R2014a":
In case you decide to install the SDK 7.1 which is available at no charge, refer to the documentation below for installation of "Microsoft Windows SDK 7.1"
There is an existing issue with the installation of SDK 7.1, so, in case you see installation failed message, refer to the link below for troubleshooting the issue:
Once, it is installed successfully,restart MATLAB and run the following MATLAB command
>>mex -setup
This should show up the C compiler.
  2 个评论
Hugo Latapie
Hugo Latapie 2014-7-18
Installing Microsoft Windows SDK 7.1 on Windows 8.1 is not recommended by Microsoft and may destabilize your system. You will need to uninstall updated code as discussed in the "Troubleshooting SDK installation" link above. Even the SDK 7.1 installer has some serious issues running on modern computers. I tried installing 7.1 on a surface pro 3 and the installer failed because apparently my screen resolution was "800X600 or less" while in fact it's 2160X1440.
Looking into getting visual studio 2013 express to work via some configuration tweaking.
Mandakini Jain
Mandakini Jain 2016-4-23
Did you end up figuring out a solution for this? Running into this problem now.

请先登录,再进行评论。

类别

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