How can I use Microsoft Visual C++ 2010 to create MEX files with MATLAB 7.10 (R2010a)?
来源:互联网 发布:至尊妖孽软件小说 编辑:程序博客网 时间:2024/05/16 16:23
直接下载下面的压缩包,然后解压出来,把\bin\win32\mexopts里面对应的文件拷贝到matlab2010a安装路径里面对应的文件夹下面即可!!
I have Visual Studio 2010 installed. However, MATLAB doesn't find the compiler.
>> 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: [0] None Compiler:
If I answer n
to the question, I get the following
Would you like mex to locate installed compilers [y]/n? n Select a compiler: [1] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker) [2] Intel C++ 9.1 (with Microsoft Visual C++ 2005 SP1 linker) [3] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker) [4] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker) [5] Intel Visual Fortran 10.1 (with Microsoft Visual C++ 2005 SP1 linker) [6] Microsoft Visual C++ 2005 SP1 [7] Microsoft Visual C++ 2008 Express [8] Microsoft Visual C++ 2008 SP1 [0] None Compiler: 8 The default location for Microsoft Visual C++ 2008 SP1 compilers is C:\Program Files (x86)\Microsoft Visual Studio 9.0, but that directory does not exist on this machine. Use C:\Program Files (x86)\Microsoft Visual Studio 9.0 anyway [y]/n? n Please enter the location of your compiler: [C:\Program Files (x86)\Microsoft Visual Studio 9.0]
What is the easiest way to compile my c++ code to make it available in MATLAB? Install Visual C++ 2008? oO
**************************************************************
It depends on what MATLAB version you are using. R2010b supports VS2010 out of the box. If you have R2010a, there is a patch available:
- Update From the World of MEX: Visual Studio 2010 Support
- How can I use Microsoft Visual C++ 2010 to create MEX files with MATLAB 7.10 (R2010a)?
How can I use Microsoft Visual C++ 2010 to create MEX files with MATLAB 7.10 (R2010a)?
Date Last Modified: Friday, March 30, 2012
Subject:
How can I use Microsoft Visual C++ 2010 to create MEX files with MATLAB 7.10 (R2010a)?
Problem Description:
I would like to use Visual C++ 2010 to create MEX files for use in MATLAB.
Solution:
The Microsoft Visual C++ 2010 compiler is not supported on the released version of MATLAB 7.10 (R2010a), but support can be added by installing a patch. To install the patch:
1. Download the patch attached to this Solution. The patch includes files needed to support these combinations of MATLAB and Visual C++ 2010:
• Visual C++ 2010 Professional and 64-bit MATLAB 7.10 (R2010a)
• Visual C++ 2010 Professional and 32-bit MATLAB 7.10 (R2010a)
• Visual C++ 2010 Express (Windows SDK 7.1 also required) and 64-bit MATLAB 7.10 (R2010a)
• Visual C++ 2010 Express and 32-bit MATLAB 7.10 (R2010a)
2. Launch MATLAB 7.10 (R2010a). If running on Windows Vista or Windows 7 run as administrator by right-clicking on the MATLAB shortcut and choosing "Run As Administrator". This permits modification of files in the MATLAB installation path.
3. Confirm that you are running MATLAB 7.10 (R2010a). You can check this using the About box available at Help->About MATLAB.
4. Unzip the contents of the patch into your MATLAB installation using the following command on the MATLAB command window.
unzip( path_to_zip_file, matlabroot);
This command will automatically unzipped the files in the correct folder and you do not have to worry about placing them in correct folder.
5. Set up MEX to use Visual C++ 2010 with the command:mex –setup
Visual C++ 2010 should now be among the listed options.
Note that this patch will only work with MATLAB 7.10 (R2010a). Using this patch with any version of MATLAB is not supported.
Other MathWorks products such as Real-Time Workshop do not support Visual C++ 2010.
Refer to http://www.mathworks.com/support/compilers/R2010a/index.html for up-to-date information concerning supported compilers.
Related Documents/Files:
- VS2010MEXSupport.zip
- How can I use Microsoft Visual C++ 2010 to create MEX files with MATLAB 7.10 (R2010a)?
- How can I use Microsoft Visual C++ 2010 to create MEX files with MATLAB 7.10 (R2010a)?
- Can I use Java to create or manage XML files?
- How can I create ePub files from my books?
- How to create a DLL library in C and then use it with C#
- How do I create a MEX file
- how to use linux epoll with c
- How to create EPS files...
- How to build mex file directly in Visual Studio 2010?
- How To Use the Spreadsheet Web Component with Visual Basic
- How to automate Microsoft Excel from Microsoft Visual C#.NET
- How to Compile XviD with Microsoft Visual C++ 6.0
- How to Compile XviD with Microsoft Visual C++ 6.0(zhuan)
- How to Compile XviD with Microsoft Visual C++6.0
- How to Compile XviD with Microsoft Visual C++ 6.0(转)
- How to Build libiconv with Microsoft Visual Studio
- How to Build libiconv with Microsoft Visual Studio
- How to create a DLL with SWIG from Visual Studio 2010
- ORA-01480: STR 绑定值的结尾 Null 字符缺失
- linux 内核编译
- 大秦4:0血洗重庆队 大秦未尝败绩陕西娃曹植破门
- gtalk
- 解决Ubuntu 10.04 睡眠后不能唤醒的问题
- How can I use Microsoft Visual C++ 2010 to create MEX files with MATLAB 7.10 (R2010a)?
- Excel操作快速手册
- 用一堆Gem来架起你的Rails3机枪
- CCNP-BSCI 002静态路由
- 从Windows到Mac的快速使用入门
- ★【树型动态规划】【NOI2008】奥运物流
- apt % dpkg
- 两岸快捷中,数据表处理总结
- opencv imread