compatibility of MEX TYPE for Matlab 2007b and visual studio 2008
1 次查看(过去 30 天)
显示 更早的评论
when i type "mex-setup and then i get Select a compiler:
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2007b\sys\lcc
[0] None
after pressing "y", how i can connect c++ to matlab,thanks
0 个评论
采纳的回答
James Tursa
2016-7-26
编辑:James Tursa
2016-7-26
LCC is a C compiler only, not a C/C++ compiler combo like Visual Studio et al. To get C++ you have to install a separate C++ compiler that is supported by your version of MATLAB, e.g. from the list here:
http://www.mathworks.com/support/sysreq/files/SystemRequirements-Release2007b_SupportedCompilers.pdf
Microsoft Visual C++ 2005 Express is listed on the page for 32-bit Windows MATLAB, so you could install that one.
Another option that sometimes works is to copy the mex support files from a later version of MATLAB (do you have any?) to the appropriate directories in your older version of MATLAB. E.g., in your case you might need to locate the files from R2008a or R2008b that support MSVC 2008 and copy them to your R2007b directories.
3 个评论
James Tursa
2016-7-27
1) Select [2] (MSVC 2008) from the list, not [1] (Lcc).
2) Issue the mex command, don't just type in the file name. E.g.,
>> mex helloworld.cpp
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!