No C ++ compiler found in MATLAB using mex

I am trying to write C ++ programs and integrate it with MATLAB using the mex interface. I wrote the mex-setup command in MATLAB, and this was the result of the Select compiler:

[0] No

I have Visual Studio 2010 installed on a 64-bit Windows 7 PC with MATLAB R2009b (64 bit) installed. I read somewhere in visual studio 2010, a 64-bit compiler must be installed. Can someone help me please

+4
source share
3 answers

Could this be due to cl.exe not located in your% PATH? Try setting PATH using the options bar to "My Computer" and try again

+4
source

You need to install both Visual Studio 2008 and the corresponding Windows SDK: http://www.mathworks.co.uk/support/compilers/R2009b/win64.html

Visual Studio 2010 is not supported by R2009b. R2010a is the first to support VS 2010.

+3
source

You ask how to compile a mex file directly on the Matlab command line.

An alternative would be to compile the mex file from Visual Studio. You might be interested in the following procedure.

Compiling mex files with Visual Studio

which was tested with Visual Studio 2010, Matlab 2010a, and for the 64-bit Intel target machine.

There is also a Visual Studio 2010 project that you can download and modify using your own configuration settings, if necessary.

0
source

Source: https://habr.com/ru/post/1396455/


All Articles