How do I associate a C compiler (not MinGW)?
1 次查看(过去 30 天)
显示 更早的评论
I want to call from MATLAB function from a lib file (compiled in C - probably in MSVS).
All instructions I found on Mathworks get me: "No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install MinGW-w64 Compiler"
I would have followed the instruction but I've noticed this: "Library (.lib) files generated by Microsoft® Visual Studio® are not compatible with MinGW"
So I rather not to. I have MSVS installed on my (windows) computer, I can't find anywhere instructions of how to 'tell' Matlab to work with this compiler.
Any one can point me to instructions how to define a C compiler i Matlab (other than MinGW)?
P.S. I am using the coder toolbox and generating MEX files all the time so I guess somewhere my Matlab does have access to a C compiler
0 个评论
回答(1 个)
Walter Roberson
2017-12-10
编辑:Walter Roberson
2017-12-10
mex -v -setup C
Note: if your VS compiler is not "Professional" then it will probably not work with MATLAB, unless you are using a fairly old version of MATLAB, or you are using VS 2017 with R2016b or newer.
Also, there are some subtle version conflicts: for example in R2017a, VS 2017 is not supported for MATLAB Compiler SDK or MATLAB Coder, and in R2017b, VS2017 is not supported for Stateflow.
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!