Skip to content

lacerbi/mexxer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mexxer

Template/interface generator for C code from MATLAB functions.

Configuring a MEX compiler in MATLAB

Windows

  • You can try with following the instructions here. Several things can go wrong; see here for some troubleshooting.
    • Great. If you have MATLAB 2015a and Windows 10, compiling MEX files might be just not possible. MATLAB 2015b and successive versions should work. See thread here.
  • As an alternative, if you already have a C compiler that you want MATLAB to recognize, download this script provided by Bas van Opheusden and follow his instructions: "After downloading this file, move it to *C:\Users\yourusername\AppData\Roaming\MathWorks\MATLAB\yourmatlabversion*. This folder is hidden but it does exist. Then you'll need to edit the name of the compiler and its path in the mexopts.bat script (lines 5,7, and 13)."

Mac OS X

  • Install Command Line Tools: In Terminal, enter xcode-select --install and install.
  • Configure MATLAB:
    • In MATLAB, enter mex -setup to see if MEX is configured.
    • If it is not, enter edit ([matlabroot '/bin/maci64/mexopts/clang++_maci64.xml']). If you are running MacOS 10.11, find and replace all instances of '10.10' with '10.11'. Presumably, you should be able to do this in MacOS 10.12 as well.
    • Enter edit ([matlabroot '/bin/maci64/mexopts/clang_maci64.xml']) and do the same.
    • Now, restart MATLAB, and try mex -setup again. It should indicate that it's properly configured.

(OS X configuration instructions courtesy of Will T. Adler.)

References

License

This is free, open source software released under the GPL-3 License. See LICENSE.txt for details.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Use this software at your own risk.

About

Template/interface generator for C code from MATLAB functions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published