Is there a way to convert MEX file into original C++ code
Show older comments
I have Mex File i want to convert it into c++ code to change some functionality in the code, is there a way that i can achieve this? Thank you.
4 Comments
OCDER
on 8 Nov 2017
Do you have the mex source file (.cpp) or the binary files (.mexw64)? If you have the mexw64 files, it's hard to get the source code:
Raj Sekhar Sana
on 8 Nov 2017
samatha solupati
on 26 Dec 2018
I have mex source file how to convert into c?
Walter Roberson
on 26 Dec 2018
mex sources have three supported variety:
- mex source that is already C source and so no conversion is needed
- mex source that is C++ source . Converting C++ to C is not always possible because C does not have any exception handling . Otherwise if you look at early C++ compilers they compiled to C code... but that would have been for old versions of C++. For new enough C++ mex source you would have to do some rewriting into older versions before you could use a C++ to C translator
- mex source that is Fortran . there are Fortran to CC translator available .you would need to touch up the names of the interface functions .
Accepted Answer
More Answers (0)
Categories
Find more on Call C++ from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!