Issu在C ++中将startMATLAB与"MatlabEngine.hpp"一起使用在r2017b中 [英] Issu using startMATLAB in C++ with "MatlabEngine.hpp" in r2017b

查看:146
本文介绍了Issu在C ++中将startMATLAB与"MatlabEngine.hpp"一起使用在r2017b中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Matlab在其新版本2017b中发布了新的C ++ MATLAB引擎API: https://fr.mathworks.com/help/matlab/calling-matlab-engine-from-cpp-programs.html

In its new version 2017b, Matlab has released a new MATLAB Engine API for C++: https://fr.mathworks.com/help/matlab/calling-matlab-engine-from-cpp-programs.html

当我尝试使用此API时(仅从开始就开始启动Matlab!),我在使用时遇到了问题:

When I try to use this API, (only to start Matlab at the beginning !!), I have an issue using :

std::unique_ptr<MATLABEngine> matlabPtr = startMATLAB();

编译正常,但执行时:

这是调用堆栈:

matlab :: engine :: initSession-> matlab :: engine :: startMATLAB-> matlab :: engine :: startMATLABAsync-> engine_create_session

matlab::engine::initSession --> matlab::engine::startMATLAB --> matlab::engine::startMATLABAsync --> engine_create_session

现在,我使用另一种方式来完成工作,但是我不想让问题没有解决方案.有人可以发现此API的问题吗?

Now, I use a different way to do my job, but I don't want to let an issue without a solution. Can someone spot the problem with this API?

我的配置:

  • Matlab 2017b
  • Visual Studio 2017
  • Windows 10

推荐答案

就像在评论中一样,我通过将Matlab从R2017b升级到R2018b来解决了这个问题!

Like in the comment, I solved the issue by upgrading Matlab from R2017b to R2018b!

这篇关于Issu在C ++中将startMATLAB与"MatlabEngine.hpp"一起使用在r2017b中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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