MATLAB to C ++,使用Matlab在C ++中生成的C ++代码 [英] MATLAB to C++ making use of matlab generated c++ code in C++

查看:150
本文介绍了MATLAB to C ++,使用Matlab在C ++中生成的C ++代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下命令生成了C ++库
"mcc -B" cpplib:SVD,SingularValueDecomposition,1.0"svd.m"

它生成了所有库和dll.我不知道如何在C ++中使用它,因为这些库使用的是c ++无法识别的数据类型,例如"mwArray".我可以在C ++中使用任何方法

I have generated a C++ library using the following command
" mcc -B ''cpplib:SVD,SingularValueDecomposition,1.0'' svd.m "

it generated all the libraries and dll s. I dont know how to make use of it in C++ as these libraries make use of datatypes such as "mwArray" which are not recognized by c++. I there any way to use the in C++

推荐答案

是否生成任何标头?如果是这样,则标头应该具有所需的定义,只需要包含标头(通常是一个包含其他必需内容的主标头),然后告诉链接器使用lib.

为您找到了这些资源:
http://tomopt.com/docs/standalone/tomlab_sal008.php [ http://tomopt.com/docs/standalone/tomlab_sal011.php#source_appendix [ ^ ]

在Matlab的帮助中找到了有关mwArray的解释:
http://www.mathworks.com/help/toolbox/compiler/mwarrayconstmwarrayarr.html [ ^ ]

如您所见,它们似乎需要附加的包含,但可能不包含在生成的标头中.
are any headers generated? if so, the headers should have the definitions you need, just need to include the headers (usually one main header that includes anything else required) and tell your linker to use the lib.

Found these resources for you:
http://tomopt.com/docs/standalone/tomlab_sal008.php[^]
http://tomopt.com/docs/standalone/tomlab_sal011.php#source_appendix[^]

Found this explanation of mwArray in Matlab''s help:
http://www.mathworks.com/help/toolbox/compiler/mwarrayconstmwarrayarr.html[^]

As you can see, they seem to require an additional include that may not be part of your generated header.


这篇关于MATLAB to C ++,使用Matlab在C ++中生成的C ++代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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