Getting null pointer error while interfacing between c++ and MATLAB

4 ビュー (過去 30 日間)
Debasish Mohapatra
Debasish Mohapatra 2018 年 6 月 15 日
コメント済み: Brian Fox 2020 年 6 月 17 日
I am trying to interface between my c++ application and MATLAB. My IDE is visual studio '17. The initial error that I found was, my application couldn't locate the .dll (libMatlabEngine.dll, libMatlabDataArray.dll) files. So, as per the following link's suggestion ( Stack Overflow ) I've moved my .dll files to the executable folder location. This helped but my startMATLAB() is returning a NULL pointer
  • Error Log: 0xC0000005: Access violation executing location 0x0000000000000000.
Could you please help me on this like where I'm going wrong?
using namespace matlab::engine;
using namespace matlab::data;
unique_ptr<MATLABEngine> matlabptr = startMATLAB();
ArrayFactory factory;
auto inputArray = factory.createArray({ 1, 6 }, cppData.cbegin(), cppData.cend());
auto time_array = factory.createArray({ 1, 6 }, time.cbegin(), time.cend());
  1 件のコメント
Brian Fox
Brian Fox 2020 年 6 月 17 日
I am having the exact same issue with VS 2015 and Matlab 2019a. Would love information on this.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCall MATLAB from C++ についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by