#include Matlab共享库的标头 [英] #include header of shared library from matlab

查看:636
本文介绍了#include Matlab共享库的标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Matlab 2008中创建了一个dll,我想在VS 2008中调用它.
当我添加创建的库的标题时,
的指针 mxCreate NumericMatrix返回0x0000000,并且memcpy()中产生访问冲突错误.
但是如果删除了标题,则上述过程将正常运行.
有人知道这个问题吗?
tnx.

I''ve created a dll in Matlab 2008 and i want to call it in VS 2008.
when i add the header of created library, the pointer of
mxCreate NumericMatrix return 0x0000000 and access violation error is produced in memcpy().
but if the header is removed the mentiond procedure works properly.
do anyone know the problem?
tnx.

推荐答案

memcpy中的访问冲突仅是由于失败的mxCreateNumericMatrix调用所致,因此指出这一点毫无意义……不要.别忘了加入Matlab网站中指定的"matrix.h"文件:
http://www.mathworks.com/help/techdoc/apiref/mxcreatenumericmatrix.html [ ^ ]

我不确定在通过Matlab代码制作自己的dll时创建的默认标头中通常是否包含此标头...
the access violation in memcpy is simply because of the failed mxCreateNumericMatrix call, so its somewhat pointless to point that out... don''t forget to include the "matrix.h" file as specified in the matlab website:
http://www.mathworks.com/help/techdoc/apiref/mxcreatenumericmatrix.html[^]

i''m not sure if this header is typically included in the default header created when you make your own dll from matlab code...


这篇关于#include Matlab共享库的标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆