Code covered by the BSD License  

Highlights from
Check whether mex file is compiled for system

5.0

5.0 | 2 ratings Rate this file 4 Downloads (last 30 days) File Size: 1.93 KB File ID: #27140

Check whether mex file is compiled for system

by Christopher Hummersone

 

01 Apr 2010 (Updated 18 Jan 2012)

Check if mex file is compiled for the OS or if the source was modified since it was compiled.

| Watch this File

File Information
Description

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')

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
18 Oct 2010 Steve Hoelzer  
21 Mar 2011 Hannes  
Please login to add a comment or rating.
Updates
27 Apr 2010

Minor: updated the help

27 May 2010

Updated description/help

28 Jul 2011

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.

18 Jan 2012

Some minor bug fixes and documentation updates

Tag Activity for this File
Tag Applied By Date/Time
mex Christopher Hummersone 01 Apr 2010 11:11:12
compile Christopher Hummersone 01 Apr 2010 11:11:13

Contact us at files@mathworks.com