nexus_mex
- : nexus_mex
option … source …¶ - :
[status, output] =nexus_mex(…)¶ Build a MEX file from C, CXX or Fortran source files, with the compiler of the system.
The sources may have the extensions .c, .cc, .cpp, .cxx, .f, .f90 or .for, and object files (.o, .obj, .a) may be given as well. The result is named after the first source, with the platform MEX extension from
mexext(.mexa64 on 64-bit Linux, .mexw64 on 64-bit Windows, matching MATLAB R2026a), and is written to the current folder.The options are those of the
mexcommand of MATLAB:-vecho the compiler commands.
-gkeep debugging information.
-Ooptimise (the default).
-Idir, -Ldir, -llib, -Dname[=value]compiler and linker settings.
-output namethe name of the result, without extension.
-outdir dirthe folder for the result.
-largeArrayDims, -compatibleArrayDimsaccepted; the large array interface is always used.
-R2018ainterleaved complex API (
-DMX_HAS_INTERLEAVED_COMPLEX=1).-R2017bseparate complex API (
-DMX_HAS_INTERLEAVED_COMPLEX=0).-silentprint nothing but errors.
-helpshow the usage of the build tool.
With output arguments, status is 0 and output holds the text of the compiler. A failed build is always an error that carries the diagnostics of the compiler.