{"id":41837933,"url":"https://github.com/equipez/setup_mex","last_synced_at":"2026-01-25T09:16:40.506Z","repository":{"id":65340085,"uuid":"586747953","full_name":"equipez/setup_mex","owner":"equipez","description":"This package provides scripts that attempt to facilitate setting up the MATLAB MEX.","archived":false,"fork":false,"pushed_at":"2025-09-03T16:17:50.000Z","size":222,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-03T17:40:37.491Z","etag":null,"topics":["c","compilers","fortran","ifort","intel","macos","matlab","matlab-mex","mex","mex-files","mex-functions","mex-gateway","mex-interface","numerical-computation","oneapi","scientific-computing","windows"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/equipez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-09T06:06:24.000Z","updated_at":"2025-09-03T16:17:54.000Z","dependencies_parsed_at":"2023-02-15T23:31:13.569Z","dependency_job_id":"676295a8-ce34-474d-9a3a-004c5af3bf93","html_url":"https://github.com/equipez/setup_mex","commit_stats":{"total_commits":190,"total_committers":2,"mean_commits":95.0,"dds":0.09473684210526312,"last_synced_commit":"570f7be1fe45c1c67e3a48e9c13fe2f7cae16a99"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/equipez/setup_mex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equipez%2Fsetup_mex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equipez%2Fsetup_mex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equipez%2Fsetup_mex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equipez%2Fsetup_mex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/equipez","download_url":"https://codeload.github.com/equipez/setup_mex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equipez%2Fsetup_mex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28750872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T09:00:19.176Z","status":"ssl_error","status_checked_at":"2026-01-25T09:00:04.131Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","compilers","fortran","ifort","intel","macos","matlab","matlab-mex","mex","mex-files","mex-functions","mex-gateway","mex-interface","numerical-computation","oneapi","scientific-computing","windows"],"created_at":"2026-01-25T09:16:40.434Z","updated_at":"2026-01-25T09:16:40.490Z","avatar_url":"https://github.com/equipez.png","language":"MATLAB","readme":"# `setup_mex`\n\n[![license](https://img.shields.io/badge/license-LGPLv3+-blue)](https://github.com/equipez/setup_mex/blob/main/LICENCE.txt)\n[![Test MEX](https://github.com/equipez/setup_mex/actions/workflows/setup_mex.yml/badge.svg)](https://github.com/equipez/setup_mex/actions/workflows/setup_mex.yml)\n[![View setup_mex on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/127968-setup_mex)\n\n## What\n\nThis package provides scripts that attempt to facilitate setting up the\n[MATLAB MEX](https://www.mathworks.com/help/matlab/ref/mex.html), focusing on macOS and Windows.\n\nNote that MATLAB requires you to install a [supported (C or Fortran) compiler along with Xcode (on macOS with Intel chips)\nor Microsoft Visual Studio (on Windows)](https://www.mathworks.com/support/requirements/previous-releases.html).\nThis package is **not** a hacking tool to circumvent these requirements,\nbut a tool to help MATLAB recognize your compiler after these requirements are satisfied.\n\nAs of 2025, we do not support Fortran setup on macOS with silicon chips, because MathWorks requires the [NAG Fortran compiler](https://nag.com/fortran-compiler/) for such a setup, which is not available for free.\n\n\nFor Fortran, this package provides scripts (`install_oneapi_macos.sh` for macOS with Intel chips and `install_oneapi_windows.bat` for Windows) to help\nyou install the Fortran compiler from\n[Intel oneAPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/overview.html),\navailable free of charge. This is the compiler officially supported by MATLAB.\n\nThis package has been successfully tested on all recent releases of MATLAB under recent versions of Windows and macOS via\n[GitHub Actions](https://github.com/equipez/setup_mex/actions/workflows/setup_mex.yml).\nNevertheless, I will not be surprised if it does not work on your machine. **In that case,\nyou need to consult a local MATLAB expert or the technical support\nof MathWorks about [\"how to set up MEX\"](https://www.mathworks.com/help/matlab/ref/mex.html)**.\n\n## How\n\nBefore starting, clone this repository. Then do the following according to your system (macOS or Windows) and your need (C or Fortran).\n\n### macOS with Intel chips\n\n- C\n\n    - Install Xcode with Clang\n    - In MATLAB, change the directory to the folder of the repository, and run\n      ```matlab\n      try_mex_setup('c')\n      ```\n\n- Fortran\n\n    - Install Xcode with Clang\n    - In [terminal](https://support.apple.com/en-hk/guide/terminal/apd5265185d-f365-44cb-8b09-71a064a42125/mac), change the directory to the folder of the repository, and run\n      ```bash\n      sudo bash install_oneapi_macos.sh\n      ```\n    - In MATLAB, change the directory to the folder of the repository, and run\n      ```matlab\n      try_mex_setup('fortran')\n      ```\n\n### Windows\n\n- C\n\n    - Install Microsoft Visual Studio with the \"Desktop development with C++\" workload\n    - In MATLAB, change the directory to the folder of the repository, and run\n      ```matlab\n      try_mex_setup('c')\n      ```\n\n- Fortran\n\n    - Install Microsoft Visual Studio with the \"Desktop development with C++\" workload\n    - In [**cmd**](https://en.wikipedia.org/wiki/Cmd.exe) (not [PowerShell](https://en.wikipedia.org/wiki/PowerShell)),  change the directory to the folder of the repository, and run\n         ```bash\n         install_oneapi_windows.bat YEAR_OF_MATLAB_VERSION\n         ```\n      where **`YEAR_OF_MATLAB_VERSION` is the year of your MATLAB version**, e.g., `2024` for MATLAB R2024a.\n\n    - In MATLAB, change the directory to the folder of the repository, and run\n      ```matlab\n      try_mex_setup('fortran')\n      ```\n\n## Remarks\n\n1. Always adopt the **default options** (e.g., installation directory) when installing Xcode (on macOS) or\n   Microsoft Visual Studio (on Windows). Otherwise, MATLAB may not be able to locate them.\n\n2. Choose the version of Xcode or Microsoft Visual Studio according to that of your\n   MATLAB, following [the official documentation of MathWorks](https://www.mathworks.com/support/requirements/supported-compilers.html).\n   The latest version does not necessarily work.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequipez%2Fsetup_mex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fequipez%2Fsetup_mex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequipez%2Fsetup_mex/lists"}