Mex libraries for accessing matlab code from C++
Show older comments
Hi Matlab experts,
I am new to the forum, so any help will be highly appreciated. I am using a C++ code, which calls functions from Matlab, using the engine:
#include "engine.h"
and uses Engine *ep, to call functions like: mxCreateDoubleMatrix(), engPutVariable(), etc., and computes a cholesky decomposition: engEvalString(ep, "U=chol(T);");.
The C++ code I am working on is from 2002, and uses Matlab R13, Linux version. It accesses the following libraries from the Makefile:
INCLUDE= -I/apps/common/matlab/R13/Linux/extern/include
LIBS= -L/apps/common/matlab/R13/Linux/extern/lib/glnx86 -lmx -lut -lmat -leng
The problem is that when I try to use a newer version of Matlab, such as 2009a on an Ubuntu machine, the libraries -lmx -lut -lmat -leng are no longer existent. Currently, without these, I get these errors (I do include the "engine.h" file):
./src/monte.cpp: In member function ‘bool CMonte::CalChol(Engine*, double*, std::vector<EleDecomp, std::allocator<EleDecomp> >*&)’:
./src/monte.cpp:346: error: ‘mxSetName’ was not declared in this scope
./src/monte.cpp:349: error: ‘memcpy’ was not declared in this scope
Please let me know if anyone has some experience with this. It will be highly helpful for me. Thanks,
Saket Gupta
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!