3 ms·
The main thing mex does is let you link to the matlab API libraries that are otherwise hard to get. To work around this, I like to just grab the API directly fr
by dsharlet 11y ago
The main thing mex does is let you link to the matlab API libraries that are otherwise hard to get. To work around this, I like to just grab the API directly from the calling process via dlsym/GetProcAddress. That way, you can build mex libraries with any toolchain you want, even without matlab installed.
- marmaduke 11y agoThis can be non-portable because the mex header will expand certain function calls to specific implementations depending on the mex options you use. I seem to recall e.g. mxGetM expanded to mxGetM700 in one version.