Visual Studio 2010 Matlab calling

조회 수: 1 (최근 30일)
Alina Badau
Alina Badau 2011년 5월 11일
Hello,
I am working with Matlab Compiler 4.6 (Matlab R2007a). I am interested in calling a Matlab function from Microsoft Visual Studio 2010, C++ project. So far, I have created a simple function in Matlab, compiled it into a Shared C++ Library. After that, I have started and created in Visual Studio 2010, a C++ project (Win 32). Visual Studio is installed on a different computer, so I installed on this computer the MCRInstaller distributed with the deployment package previously and changed the VC++ include directories to C:\Program Files\MATLAB\MATLAB Component Runtime\v76\extern\include . So, I started creating a basic class and include "engine.h" and after that declare Engine *ep, in order to execute after that ep = engOpen(""); I have a first error < "Engine" undeclared identifier>
I want to know what I am doing wrong, what other settings I am supposed to consider and also if this is the best approach.
Please indicate me, if it's available, some good documentation for calling Matlab from C++ project in Visual Studio 2010.
Kind regards, Alina Badau

답변 (1개)

Saurabh Thakur
Saurabh Thakur 2011년 5월 11일
When calling a MATLAB Compiler built C++ shared library you should use the procedure mentioned below
engOpen() is used to communicate with the MATLAB Engine i.e. a complete installation of MATLAB present on the system and not a compiled C++ shared library.

카테고리

Help CenterFile Exchange에서 Call MATLAB from C에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by