How to debug QT-based C++ application that uses Matlab Engine API?

2 ビュー (過去 30 日間)
Johannes Sedlmeier
Johannes Sedlmeier 2016 年 2 月 26 日
回答済み: David McMinn 2017 年 3 月 9 日
I am trying to debug a QT-based application (C++) that invokes the Matlab Engine API. As debugger I use cdb.exe from MS Visual Studio 2013 x64 within the QT Creator. The OS is Win7 x64.
Every time I start the debugger, the debugger chrashes. This behavior can be reproduced by creating a console application in QT and including the "engine.h" and adding the line:
Engine* ep = engOpen("");
in the main()-function.
  1 件のコメント
Juan David MANJARRES
Juan David MANJARRES 2016 年 9 月 28 日
Did you solved the problem ? I have the same trouble linking matlab's libraries, actually Qt recognise and compile the libraries but then the application crashes.

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

回答 (1 件)

David McMinn
David McMinn 2017 年 3 月 9 日
We had the same problem. Turns out that while running under the debugger the MATLAB DLLs could not be found but it was OK in release mode. We had to add "C:\Program Files\MATLAB\2015a\runtime\win64" to the PATH environment variable in the Run settings for the project.

カテゴリ

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