使用MAT和MATRIX Matlab函数的C ++ [英] C++ using MAT and MATRIX matlab functions

查看:160
本文介绍了使用MAT和MATRIX Matlab函数的C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用matlab C代码将MATLAB文件从MATLAB加载到C ++代码.

我正在使用MATLAB 2010a和MATLAB comand给出的c文件:

I want to load mat files from MATLAB to C++ code with the use of matlab C-code.

I am using MATLAB 2010a and the c-file given by MATLAB comand:

edit([matlabroot ''/extern/examples/eng_mat/matdgns.c'']);



我通过Project->>> Properties->> VC ++ Directory链接了VS 2010b1中的库.
我在运行mat.h函数时遇到问题.我遇到这种错误:
错误LNK2019:函数"int __cdecl diagnostic(char const *)"中引用的未解析的外部符号_matGetNextVariable(?diagnose @@ YAHPBD @ Z)
1>



I linked the libraries in VS 2010b1 via Project->>Properties->>VC++Directories.
I have problems with running mat.h functions. I get this kind of errors:
error LNK2019: unresolved external symbol _matGetNextVariable referenced in function "int __cdecl diagnose(char const *)" (?diagnose@@YAHPBD@Z)
1>

推荐答案

尝试在此处查找类似的内容 [ ^ ].如果找不到,您可以在此处提出这个问题.
这样会更快,而且人们可能会更好地解决这个问题.
Try looking something similar here[^]. If you don''t find, you can ask this question there.
It would be quicker and people out there might be better for such question.


我认为您的问题更有可能与lib格式有关.

如果您在记事本中打开matlab库,请搜索?diagnose @@ YAHPBD @ Z
如果找到它,则说明您的库是兼容的.如果不兼容,则可能必须对lib文件运行转换,以创建VC ++可以理解的版本.

这可能会有所帮助

http://www.mathworks.com/support/solutions/zh-CN/data/1-2Q3TJ5/?solution=1-2Q3TJ5
I think your problem is more likely to do with lib format.

If you open your matlab lib in notepad the search for ?diagnose@@YAHPBD@Z
If it finds it your library is compatable. If it is not compatable your may have to run a conversion on the lib file to make a version the VC++ understands.

this may help

http://www.mathworks.com/support/solutions/en/data/1-2Q3TJ5/?solution=1-2Q3TJ5


这篇关于使用MAT和MATRIX Matlab函数的C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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