Azzera filtri
Azzera filtri

Visual Studio 2010 Matlab calling

1 visualizzazione (ultimi 30 giorni)
Alina Badau
Alina Badau il 11 Mag 2011
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

Risposte (1)

Saurabh Thakur
Saurabh Thakur il 11 Mag 2011
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.

Community Treasure Hunt

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

Start Hunting!

Translated by