MEX will not find Visual Basic

I'm using matlab 2015b on a windows 8.1 machine, and I need to compile .dll files in order to use phantom camera software for a research project I'm working on. I have visual studio 2015, and when I give the
"mex -setup"
command, I get back an error message saying that there is no SDK (which there is) and that a compiler wasn't found and directs me to a website which tells me that visual basic 2015 should work. I've tried many different things, including trying to alter the search path for MEX. I looked into the registries and found that visual basic is definitely in there.
Whats up? I just need Matlab to use visual basic to compile my .dll's
Thanks!

1 comentario

Geoff Hayes
Geoff Hayes el 15 de Oct. de 2015
Susan - what does the following return
mex -setup -v
The above is similar to the command that you have run but with verbosity enabled. Please post the results here so that we can debug the problem further. Please also verify that your Visual Studio provides one of the compilers that are listed at the following link http://www.mathworks.com/support/compilers/R2015b/index.html.

Iniciar sesión para comentar.

Respuestas (1)

Rohit Kudva
Rohit Kudva el 19 de Oct. de 2015
Hi Susan,
As Geoff mentioned, if will be really helpful if you could post the output of
>> mex -setup -v
One possible reason for this issue can be that MATLAB was trying to find Windows SDK 8.1 but did not find it and thus failed to list Visual C++ 2015 as a compiler. The Windows SDK 8.1 gets installed as a part of the Visual Studio 2015. Check if SDK 8.1 is installed on the machine. If not, install SDK 8.1. Also, there is a possibility that instead of SDK 8.1, SDK 8.1A is present on the machine. In such cases, uninstall SDK 8.1A and install SDK 8.1. This should allow MATLAB to list Visual C++ 2015 as an installed compiler.
Regards,
Rohit

4 comentarios

Geoff Hayes
Geoff Hayes el 27 de Oct. de 2015
Susan's answer moved here
We've been working on this problem for some time now. I've updated the windows SDK to 8.1 already, not 8.1a
Here's the verbose output. Anyone have any ideas? I've even tried installing earlier versions of VS in hopes that mex would be able to find it easier, but to no avail.
>> 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 'MinGW64 Compiler (C)' ...
... Looking for environment variable 'MW_MINGW64_LOC' ...No.
Did not find installed compiler 'MinGW64 Compiler (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 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
Did not find installed compiler 'Microsoft Visual C++ 2013 Professional (C)'.
... Looking for compiler 'Microsoft Visual C++ 2015 Professional (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 14.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 14.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 14.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 14.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe' ...No.
Did not find installed compiler 'Microsoft Visual C++ 2015 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.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...No.
Did not find installed compiler 'Microsoft Windows SDK 7.1 (C)'.
Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see
Install MinGW-w64 Compiler. For more options, see
http://www.mathworks.com/support/compilers/R2015b/win64.html.
Geoff Hayes
Geoff Hayes el 27 de Oct. de 2015
Editada: Geoff Hayes el 27 de Oct. de 2015
Susan - note how the above is looking for SDK 7.1 or Visual C++ 2015 Professional. You have indicated that you are using SDK 8.1 and Visual Studio 2015. You need to check http://www.mathworks.com/support/compilers/R2015b/index.html. to see what are the supported compilers for your environment.
Susan Griffith
Susan Griffith el 27 de Oct. de 2015
You're right about the SDK not being a match, I hadn't noticed that. But we've been using visual studio 2015 as our compiler and it's not working despite the fact that it's listed among the supported compilers for 2015b. Is there a way to get MEX to search for 8.1 instead of 7.1?
Geoff Hayes
Geoff Hayes el 27 de Oct. de 2015
I don't think that you can trick MEX into searching for 8.1 instead. Perhaps Rohit will have a solution.

Iniciar sesión para comentar.

Categorías

Más información sobre C Shared Library Integration en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 15 de Oct. de 2015

Comentada:

el 27 de Oct. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by