vc2008 与 matlabR2007a混编的配置过程
来源:互联网 发布:mac下查询ant是否安装 编辑:程序博客网 时间:2024/05/04 02:48
系统平台:windows xp sp2, visual studio 2008 professional, matlab R2007a
首先,为了使matlab 能够找到vs2008编译器,需要下载以下一些配置文件。http://www.mathworks.com/matlabcentral/fileexchange/18508
依据下载文件中directory.txt文件中所给出的文件目录:
MATLABROOT\bin\win32\mexopts
MATLABROOT\bin\win32\mbuildopts
将对应目录VS2008MATLABMexCompilerFilesX86中的6个文件拷贝到mexopts目录下;
将对应目录VS2008MATLABMBuildCompilerFilesX86中的2个文件拷贝到mbuildopts目录下。
第二步,打开matlab应用程序,运行mex -setup命令:
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? n(由于本机的vs2008没有安装在系统目录下,所以不适用mex搜索编译器)
Select a compiler:
[1] Borland C++ Compiler (free command line tools) 5.5
[2] Borland C++Builder 6.0
[3] Borland C++Builder 5.0
[4] Compaq Visual Fortran 6.1
[5] Compaq Visual Fortran 6.6
[6] Intel C++ 9.1 (with Microsoft Visual C++ 2005 linker)
[7] Intel Visual Fortran 9.1 (with Microsoft Visual C++ 2005 linker)
[8] Intel Visual Fortran 9.0 (with Microsoft Visual C++ 2005 linker)
[9] Intel Visual Fortran 9.0 (with Microsoft Visual C++ .NET 2003 linker)
[10] Lcc-win32 C 2.4.1
[11] Microsoft Visual C++ 6.0
[12] Microsoft Visual C++ .NET 2003
[13] Microsoft Visual C++ 2005
[14] Microsoft Visual C++ 2005 Express Edition
[15] Microsoft Visual C++ 2008
[16] Microsoft Visual C++ 2008 Express Edition
[17] Open WATCOM C++ 1.3
[0] None
选择编号为15的Microsoft Visual C++ 2008编译器。
紧接着会给出vs2008的默认路径:c:\program files\microsoft visual studio 9.0
Use c:\program files\microsoft visual studio 9.0 [y]/n? n (手动设置vs2008的路径)
Please enter the location of your compiler:。。。。(在此输入vs2008的安装路径,如E:\programs\VS2008)
然后确认编译器的路径是否正确。
第三步,matlab提示编译器用到了windows 平台SDK库,并且没有找到MSSdk环境变量:
手动添加系统环境变量:MSSdk。
变量名:MSSdk;
变量值:C:\Program Files\Microsoft SDKs\Windows\v6.0A
设置完成该环境变量后,重启matlab,再次输入mex -setup,手动选择编译器类型[15] Microsoft Visual C++ 2008,
手动设置vs2008安装路径,matlab提示无错误,混合编译环境变配置完成。
注意:由于该混合编译的方式用到了vs2008的运行时库,所以在程序发布时,需要将vs2008的运行时库一并包含在内。
可以通过在文件msvc90opts.stp中修改my $default_location的值为:my $default_location = "E:\\programs\\VS2008";
来给出vs2008的安装目录,省去每次手动输入路径时的麻烦。
- vc2008 与 matlabR2007a混编的配置过程
- python与c++混编过程中遇到的一些问题
- vc2008下的wxWidgets配置
- vc2008界面的一些配置
- Cocos2dx与UIKit的混编
- ARC与MRC的混编
- swift 与 OC 的混编
- swift与OC的混编
- ReactNative与iOS的混编
- OC与C++混编工程配置
- wxWdigets在VC2008下的配置
- VC2008的一些常用工程配置
- VC2008+OpenCV2.3.1 的安装配置
- C与C++与OC的混编
- mrc和arc混编的配置
- OC和Swift混编的配置
- vc6.0 与 vc2005,vc2008的区别
- PHP与HTML混编的一点疑惑
- Android高手进阶教程(二十)---Android中的日历读写操作!!!
- 从csdn搬家到wordpress 转自:http://youthmemo.com/?p=2082
- NS2从安装到调试系列记录---之安装篇
- 存储过程中调用EXECUTE IMMEDIATE的“权限不足”问题
- 你的代码,我的地狱
- vc2008 与 matlabR2007a混编的配置过程
- 判断一个单向链表中是否有环
- Eclipse 常用快捷键
- 平衡二叉树思想及C语言实现
- 各种字符串Hash函数比较
- 在Ubuntu上搭建PHP+Mysql+Nginx环境(apt-get方式)
- JS获取浏览器窗口大小,屏幕,网页宽高
- stringObj.match(rgExp)
- IP可获省