vs怎么调用matlab函数,从VS.NET调用Matlab函数

Mark Jones wrote in message

...

> Hanifa wrote:

Hi,

With reference to this tutorial

How do I create a C shared library with MATLAB Compiler 4.0 that can be used in a Microsoft .NET 2003 project ?

I had followed this tutorial and was able to compile

successfully with some changes like instead of

$MATLAB\extern\include , I used the complete directory name.

However,the problems arose during runtime.

Upon hitting this line ---foolinInitialize()

A barrage of java errors(I presume) like

> > Warning: Could not read classpath.txt

> > Warning: Could not read librarypath.txt... etc..

> > But I clicked Ok for all these diaglog boxes.

But alas, I received this error,

> > ??? Undefined function or variable 'matlabrc'.

> > Undefined function or variable 'matlabrc'. When MATLAB or

> > the MCR starts, they attempt to execute the M-file

> > matlabrc.m. This message means that this file cannot be

found.

> > To work around this, try each of these suggestions in this

> > order:

> > -Ensure that your application runs in MATLAB (uncompiled)

> > without this error.

> > -Ensure that MATLAB starts up without this error.

> > -Verify that the generated CTF archive contains a file

> > called matlabrc.m.

> > -Verify that the generated code (in the

> > *_mcc_component_data.c* file) adds the CTF archive directory

> > containing matlabrc.m to the MCR path.

> > -Delete the *_mcr directory and rerun the application.

> > -Recompile the application.

I have tried all the suggestions except this one.."Verify

that generated CTF...... to the MCR path" as I dont know how

check whether mcc_component adds matlabrc.m file to MCR path.

Anyone can give me any suggestion or help on how to go about

solving this..

Thanks. Hi Hanifa,

>

For example, after you attempt to run your application you

will have a *_mcr directory. If you search that directory for

matlabrc.m you should

find it under *_mcr\toolbox\local

And, if you look inside *_mcc_component_data.c, where it

defines MCC_*_matlabpath_data you should see "toolbox/local/".

However, whether you find "toolbox/local/" in the .c file

or not, I would suggest that you submit a help request at:

http://www.mathworks.com/support/

They should be able to help you troubleshoot this more

thoroughly.

Mark Hi Mark, thanks for the reply..

I did find matlabrc.m in the toolbox but under this directory

foolib_mcr\toolbox\compiler\deploy

Anwyway I have put up a bug at website, you have given.

Hopefully, there is a resolution to this problem.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值