Coder Social home page Coder Social logo

romaintilhac / setup_mex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from equipez/setup_mex

0.0 0.0 0.0 120 KB

This package provides scripts that attempt to facilitate setting up the MATLAB MEX.

License: GNU Lesser General Public License v3.0

Shell 13.55% MATLAB 71.56% Batchfile 14.90%

setup_mex's Introduction

setup_mex

license Test MEX View setup_mex on File Exchange

What

This package provides scripts that attempt to facilitate setting up the MATLAB MEX on macOS or Windows. For Fortran, it will install (automatically) the Fortran compiler from Intel oneAPI, available free of charge. The setup on Linux is trivial and Linuxers should be capable of handling it half asleep.

Whether the method here works or not, it depends on the configuration of your system and your MATLAB. Trying will not hurt. In case it fails, you need to consult a local MATLAB expert or the technical support of MathWorks about "how to set up MEX".

How

Before starting, clone this repository. Then do the following according to your system (macOS or Windows) and your need (C or Fortran).

macOS

  • C

    • Install Xcode with Clang

      (After installing Xcode, type in Terminal: xcodebuild -find make xcodebuild -find gcc xcodebuild -find g++ xcodebuild -find clang xcodebuild -find clang++)

    • In MATLAB, change the directory to the folder of the repository, run

    try_mex_setup('c')
  • Fortran

    • Install Xcode with Clang
    • In terminal, change the directory to the folder of the repository, run
    sudo bash install_oneapi_macos.sh
    • In MATLAB, change the directory to the folder of the repository, run
    try_mex_setup('fortran')

Windows

  • C

    • Install Microsoft Visual Studio with the "Desktop development with C++" workload
    • In MATLAB, change the directory to the folder of the repository, run
    try_mex_setup('c')
  • Fortran

    • Install Microsoft Visual Studio with the "Desktop development with C++" workload
    • In cmd (not PowerShell), change the directory to the folder of the repository, run
    install_oneapi_windows.bat
    • In MATLAB, change the directory to the folder of the repository, run
    try_mex_setup('fortran')

Remarks

  1. Always adopt the default options (e.g., installation directory) when installing Xcode (on macOS) or Microsoft Visual Studio (on Windows). Otherwise, MATLAB may not be able to locate them.

  2. Choose the version of Xcode or Microsoft Visual Studio according to that of your MATLAB, following the official documentation of MathWorks. The latest version does not necessarily work.

setup_mex's People

Contributors

zaikunzhang avatar dependabot[bot] avatar romaintilhac avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.