VC++与Matcom混合编程方法

8 views
Skip to first unread message

Zeke

unread,
Nov 15, 2007, 6:59:47 AM11/15/07
to The World Of MATLAB
1 混合编程环境设置
a 安装Matcom,确定VC++为外部C/C++编译器
b 将Matlab.h和v4500v.lib添加到VC++工程中
c 设置project->settings->c++->category->precompiled headers为automatic use of precompiled headers
d 设置project->settings->c++->category->preprocessor->additional include directory为Matcom安装目录\lib
 
2 混合编程一般过程
a 在Matcom中编写m文件,将转化后的cpp文件加入VC++工程中
b 在vc++消息响应函数中所在的文件添加头文件:#include "matlib.h"
c 在消息响应函数中首先添加:
initM(MATCOM_VERSION);
exitM();
d 在initM(),exitM()中间填充从M文件转换后的C++代码
f 编写其他VC++代码
Reply all
Reply to author
Forward
0 new messages