MATLAB Engine Windows 7问题 [英] MATLAB Engine Windows 7 problem

查看:194
本文介绍了MATLAB Engine Windows 7问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图说明如何使用Matlab引擎,所以我可以使用C ++ GUI与matlab功能,但我有一些麻烦,想弄明白如何使用MATLAB引擎类。我做的第一件事是尝试运行他们的例子后,一个尝试,我在一个成功的构建,我的错误,应用程序无法正确启动0xc000007b如何解决这个问题,这将是什么?此外,我试图运行我自己的代码,即使它很简单,它仍然没有工作。

I am trying to figure how to use the Matlab engine so I can use C++ GUI with matlab function however I am having some trouble trying to figure out how to use the MATLAB engine classes. The first thing I did was try to run their examples after a bit of trying I go this error upon a successful build, "The application was unable to start correctly 0xc000007b" How do I fix this and will this? In addition I attempted to run my own code too, even though it was simple it still did not work.

注意:a做了几个搜索,我发现是还有一个类似的标志与adobe cs5,还我运行依赖关系walker,它说它没有找到任何依赖libeng.dll
这是我运行;

Note: a did a couple of searches and all I found was that there is a simmilar porblem with adobe cs5, Also I ran dependency walker and it said it did not find any dependencies on libeng.dll Here is what I ran;

    int main(){
Engine *ep;
ep = engOpen(NULL);
engEvalString(ep, "3+4");
return 0; }

系统是Windows 7企业64位

The system is Windows 7 enterprise 64 bit

推荐答案

此错误可能是由于您的机器上安装不正确或安装了多个Matlab。 打开命令窗口并键入

This error is likely due to incorrect installation or multiple installations of Matlab on your machine. Check your Windows %PATH% environment variable by opening a command window and typing

echo %PATH%

单个Matlab安装,编辑%PATH%并删除所有这些,除了您将要与您的程序使用的安装的引用。以下dll必须在您的%PATH%:libeng.dll和libmx.dll中。不要将这些dll复制到系统目录 - 改变你的%PATH%

When it contains references to more than a single Matlab installation, edit %PATH% and remove all of them except the reference to the installation you are going to use with your program. The following dlls must be in your %PATH%: libeng.dll and libmx.dll. Don't copying these dlls to a system directory -- change your %PATH% instead.

请在命令行上执行此命令以使用Windows COM 注册Matlab引擎。

Make sure to execute this command on the command line to register the Matlab engine with Windows COM.

matlab /regserver

这篇关于MATLAB Engine Windows 7问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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