All Collections
Tips and Tricks
Installation tips
Binaries on Code Ocean: compiling and executing (e.g., MEX files in MATLAB)
Binaries on Code Ocean: compiling and executing (e.g., MEX files in MATLAB)

For all binaries and executables, please include source code whenever possible.

Shahar Zaks avatar
Written by Shahar Zaks
Updated over a week ago

MEX files (MATLAB executables) are dynamically-linked libraries, and as such are (1) platform-specific and (2) binary. These qualities challenge reproducibility because:

  1. You may have compiled your executable files on Windows, while Code Ocean runs Linux, and some readers might run any operating system locally.

  2. compiled binaries are not transparent, so readers will be unable to inspect and reuse the code.

We ask that authors include the source code for all executables and build them on Code Ocean. (For MEX in particular,  this may require installing a compiler like gcc , or the entire C++ toolchain in build-essential, through apt-get. See Configuring your computational environment: an overview for further information.)

See the published capsule BRAS: Bundle Robust Alignment for Panoramic Stitching for a demonstration of compiling mex files on Code Ocean. 

If you have any questions about compiling your source code, contact us through live chat or support@codeocean.com, we will be happy to help.

Did this answer your question?