File Exchange

image thumbnail

Check whether mex file is compiled for system

version 1.5.0.0 (715 KB) by Christopher Hummersone
Check if mex file is compiled for the OS or if the source was modified since it was compiled.

1 Download

Updated 05 May 2018

GitHub view license on GitHub

NOTE: this function is now available from the IoSR Matlab Toolbox as iosr.general.checkMexCompiled.
-------------------------
CHECK_MEX_COMPILED Check if mex file is compiled for system.

SYNTAX

CHECK_MEX_COMPILED(SOURCE_FILE)
CHECK_MEX_COMPILED(OPTIONS,SOURCE_FILE)

DESCRIPTION

CHECK_MEX_COMPILED(SOURCE_FILE) checks whether a mex source file SOURCE_FILE is compiled for the current operating system OR whether the source file has been modified since it was compiled. It is compiled if it does not pass these tests (to the same directory as the source file). SOURCE_FILE must be a string that is the name of a source file on the MATLAB search path.

CHECK_MEX_COMPILED(OPTIONS,SOURCE_FILE) passes the script switches in OPTIONS to the mex compiler, one argument per switch.

USAGE EXAMPLE

% check function compiled, with useful debugging info,
% and with large-array-handling API
check_mex_compiled('-v','-g','-largeArrayDims','myfunction.c')

Cite As

Christopher Hummersone (2020). Check whether mex file is compiled for system (https://github.com/IoSR-Surrey/MatlabToolbox), GitHub. Retrieved .

Comments and Ratings (2)

Hannes

Updates

1.5.0.0

Migrated to GitHub.

1.5.0.0

Some minor bug fixes and documentation updates

1.4.0.0

Minor alterations: function now calls MEX directly (rather than through EVAL), changed the way the OPTIONS are handled to bring it more in line with MEX functionality.

1.3.0.0

Updated description/help

1.2.0.0

Minor: updated the help

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags