How to compile MEX binary that only works on 64 bit Linux to use it on macOS?
4 views (last 30 days)
I have a compiled MEX binary that only works on 64 bit Linux ( https://github.com/getzlab/MutSig2CV/blob/master/src/str2doubleq.mexa64 ) and I would like to recompile it for my system (macOS Monterey). I have MatLab compiler but I have no idea how to do it as I am fearly new to MatLab. Could anyone please give me any advice, please?
Walter Roberson on 8 Aug 2022
It is not necessary to cross-compile; the GIT repository includes the .cpp source code (and the .c sources needed for different .mex* files.)
Unfortunately the repository does not include a build script.
You probably start by installing XCode -- though possibly you can get away with installing the command line tools, by going into terminal and commanding
Then in MATLAB,
mex -setup C++
mex -setup C
then (I suspect)