At first I was getting the following error:
error C2065: 'Engine' : undeclared identifier
So i added the following line to my cpp file:
#include "C:/Program Files/MATLAB/R2008a/extern/include/engine.h"
But then I would start getting a couple of the following errors:
error LNK2019: unresolved external symbol _engClose referenced in function
_main
So I added the following to my code:
#pragma comment (lib,"C:/Program Files/MATLAB/R2008a/extern/lib/win32/
microsoft/libeng.lib")
#pragma comment (lib,"C:/Program Files/MATLAB/R2008a/extern/lib/win32/
microsoft/libmx.lib")
#pragma comment (lib,"C:/Program Files/MATLAB/R2008a/extern/lib/win32/
microsoft/libut.lib")
This made the program link and compile. However, upon running the
program, it would close with the following error:
Unable to Locate Component
This application has failed to start because libeng.dll was not found. Re-
installing the application may fix the problem.
So I copied libeng.dll from C:/Program Files/MATLAB/R2008a/bin/win32 to
my project directory. It then asked me for another dll, which I also copied.
This went on a couple of times until I got tired and copied over all the dlls in
the win32 directory to my project directory. The program now opens and
immediately crashes. A window pops up with the following message:
Microsoft Visual C++ Runtime Library
Runtime Error!
Program: c:\Documents and...
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
The output on my project window says:
Severe:
MATLAB:I18n:MissingICUData - ICU Data not found.
The program '[2760] c:\Documents and
Settings\Administrator\Desktop\simple\PumaClient.exe: Native' has exited
with code 2 (0x2).
I have read the "Compiling and Linking MATLAB? Engine Programs" section
of the help. but I'm obviously confused and would really appreciate if you
could walk me on this one...
Thank you very very much!
James Tursa
I'm trying to compile it directly from VS2003. I solved my problem
downgrading from the latest version of Matlab to 6.5 (which I had lying
around). It now works perfectly only with the linking of the libraries + dll
files.
Could this be a bug in Matlab R2008a?
---------------------------------------------------
Hi - has a workaround for this issue been identified? I'm seeing the same thing with example engwindemo on 2009A. Thanks. Gary
Thanks, Gary
I was able to compile the sample projects on a computer with the full Matlab environment + the compiler installed. Now I'm trying to run the resulting executable on a computer with only the matlab compiler runtime installed (because we want to distribute this program to people who don't have matlab). And I'm getting the same error. Have not yet found a solution.
"Mike " <schn...@ict.usc.edu> wrote in message <hpe1hk$1sp$1...@fred.mathworks.com>...
That allows the .exe to find the .dll files required by the matlab compiler runtime.
Then I had to reboot (I think this was the missing step).
Also the .exe has to be compiled against the same version of the .dll that it is being run with.
"Dominique " <domd...@gmail.com> wrote in message <hpkk16$pnk$1...@fred.mathworks.com>...
Hi
Even i am trying to make this demo work. I was able to run the demo in Visual studio 2005 version. But when i do the same steps . The build is complete it says that i am missing a libeng.dll
So "Matlab engine can't open"
I have tried the path to vs->tools->options->projects&solutions->C++ directories. As i know where the libeng.dll is there in the matlab folder. Also i tried attaching it in the solution explorer. As a existing item. Please help
thanks in advance
I run engdemo.cpp from matlab R2009b on VS2005, and I got this error:
"engwindemo.exe - system error. The program can't start because libmx.dll is missing from your computer...."
I can find libmx.dll in the matlab root: C:/Program Files/MATLAB/R2009b/extern/lib/win32/microsoft
I also have created the path to Matlab in the VS2005 "Include files" and "Library files" Directories, and included the appropriate library files in VS2005. Wonder why do I get this message.
Really appreciate for your help.
Thank you,
Vidy
HELP PLEASE!
Right click My Computer -> Properties -> Advanced Tab -> Environment Variables -> Edit PATH Variable. Add the directory containing libmx.dll to the end.
Then close and reopen your visual studio solution, and the program should run.
"Victor" wrote in message <im92j8$les$1...@fred.mathworks.com>...
"Seth " <wingm...@hotmail.com> wrote in message <itg8hg$ep5$1...@newscl01ah.mathworks.com>...