Mex-functions can be compiled using the C structure mxArray. But it's also possible to use the C++ mwArrays and all the C++ math library. Use "cppmex -setup" to initialise the compiler for your installation and then type cppmex instead of mex. Now the entry point become void cppMexFunction(int nlhs, mwArray mlhs, int nrhs, mwArray mrhs).
Jerome Lacaille (2021). cppmex (https://www.mathworks.com/matlabcentral/fileexchange/2554-cppmex), MATLAB Central File Exchange. Retrieved .
I found error when run:
>> cppmex -setup
??? Error using ==> cppmex_setup at 8
Can't find <C:\Program Files\MATLAB\R2008a\extern\include\libmmfile.mlib>.
Error in ==> cppmex at 60
Plz help me! many thanks.
It's a really helpfull extension to the compiler. It make it very easy to write and to translate mex files.
Thanks to Jerome
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!