using deployment tool I produced the c++ shared library. My Matlab Function just get one input parameter which is the path of images, and return a 1*6 vector in double;
I searched a lot on net and found the steps the calling Matlab functions in C++; Now I know that at first I must initialize the application and the library such as these:
#include <libname.h>
mclInitializeApplication();
mclInitializeApplication();
and I know that at last I must call functions for terminate:
<libname>Terminate();
mclTerminateApplication();
but I dont know how can I pass a string to the matlab function. I write so:
string path = "C:\\Users\\user\\Documents\\MATLAB\\Mypic.jpg";
mwArray im_path;
In calling im_path.SetData()
I do not know which type I must use. the types of first parameter, does not include any type related to string.
Also I do not know how to call the Matlab function and which parameters I must pass to that.
please help me if you do that call before.
thank you so much!
mixed-programming
is short for Mixed-Language Programming, in which the source code is written in two or more languages, i.e. enables you to call existing code that may be written in another language. I don't quite agree it is a meta tag. I have answered several questions, seen here. They actually did want to do this but they just list the different languages involved. But what they really want to do is mixing them together, not to do it in all these languages. Such a tag can help to describe such questions more accurately. - herohuyongtaomixed-language-programming
? - herohuyongtao