简体   繁体   中英

Error using mex -setup: “No supported compiler or SDK was found”

I am using MatConvNet with the Microsoft Visual C/C++ 2015 compiler. It was installed and it worked. However, when I run mex -setup I get the error message No supported compiler or SDK was found. MatConvNet still works and the compiler file is clearly in C:\\Program Files\\MATLAB\\R2017b\\bin\\win64\\mexopts so why do I get that error message?

Call:

  mex -v -setup

Then look in the details, why your compiler was not found.

In my case eg it was because the registry variable:

HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VS7

was set to

C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\TestPro

instead of

C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\

You seem to be using MATLAB R2017b. The list of supported compilers states that R2017b supports MS Visual C++ 2015 professional , so I'm guessing, you're using the community edition.

In that case, the easiest way forward is to get your hands on Visual C++ 2017, making sure that MatConvNet also works there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM