mex at 222 Unable to complete successfully.

来源:互联网 发布:ppt图表如何显示数据 编辑:程序博客网 时间:2024/05/01 07:49
 问题描述:D:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: No compiler options file could be found to compile source code. Please run "mex -setup" to rectify. 
 ??? Error using ==> mex at 222 Unable to complete successfully.
 在matlab命令行

问题分析:要混编代码,没有安装混编译器

解决方案:用 mex -setup安装之,因为你自己有C++的编译器,我是选择VS2008的,不行的话,自己每个都试试,就OK了,如下:


>> mex -setup
Please choose your compiler for building external interface (MEX) files: 
 
Would you like mex to locate installed compilers [y]/n? y
 
Select a compiler: 
[1] Lcc-win32 C 2.4.1 in D:\PROGRA~1\MATLAB\R2010a\sys\lcc 
[2] Microsoft Visual C++ 2008 SP1 in D:\Program Files\Microsoft Visual Studio 9.0 
[3] Microsoft Visual C++ 6.0 in D:\Program Files\Microsoft Visual Studio 
 
[0] None 
 
Compiler: 2
 
Please verify your choices: 
 
Compiler: Microsoft Visual C++ 2008 SP1  
Location: D:\Program Files\Microsoft Visual Studio 9.0 
 
Are these correct [y]/n? y
 
*************************************************************************** 
  Warning: MEX-files generated using Microsoft Visual C++ 2008 require 
           that Microsoft Visual Studio 2008 run-time libraries be  
           available on the computer they are run on. 
           If you plan to redistribute your MEX-files to other MATLAB 
           users, be sure that they have the run-time libraries. 
*************************************************************************** 
原创粉丝点击