User`s guide
R2008b
17-40
New Function Displays Information about MEX Compiler Configurations
The mex.getCompilerConfigurations function displays information about the selected
compiler and associated switches and options that MATLAB uses to build a MEX-file.
The selected compiler is the one you choose when you run the mex -setup command. For
more information, see Building MEX-Files.
New Functions to Catch Errors in MEX-Files Replace mexSetTrapFlag
Two new MEX library functions have been added to the MATLAB C and Fortran API.
The mexCallMATLABWithTrap function, like mexCallMATLAB, lets you call MATLAB
functions from within a MEX-file. In addition, mexCallMATLABWithTrap lets you catch,
or trap, errors. Using this function for exception handling is more flexible that using
mexCallMATLAB with the mexSetTrapFlag function.
Likewise, the mexEvalStringWithTrap function adds error handling to the
mexEvalString function.
Compatibility Considerations
In the near future you will be required to update your MEX-files to remove use of the
mexSetTrapFlag function.
“Duplicate dylib” Warning on Macintosh Systems
When compiling MEX-files on an Apple Mac OS Version 10.5 system you can ignore a
warning about a duplicate library libz.1.dylib. The MEX-file builds properly and
runs as expected. The warning message contains the following information:
ld: warning, duplicate dylib
Microsoft Visual Studio "X64 Compilers and Tools" Required for 64-bit
Systems
If you use Microsoft Visual Studio with MATLAB on 64-bit systems, you must choose
"X64 Compilers and Tools" when you install the following products:
• Visual Studio 2008 Express Edition