External Interfaces/API, MATLAB® Version 7.2 (R2006a)

MEX-Files Built with gcc on Linux® Must Be Rebuilt

In MATLAB® V7.2 (R2006a) on Linux® and Linux[1] x86-64 platforms, MEX-files built with gcc must be recompiled and relinked using gcc version 3.4 or later. Rebuilding is required because MATLAB V7.2 (R2006a) on Linux and Linux x86-64 platforms is built with gcc version 3.4.

Compatibility Considerations

Changes in gcc version 3.4 have caused incompatibilities between MATLAB V7.2 (R2006a) and MEX-files built with gcc versions earlier than 3.4.

On Linux and Linux x86-64 platforms, MEX-files built with gcc versions earlier than 3.4 cannot be used in MATLAB V7.2 (R2006a).

On Linux and Linux x86-64 platforms, MEX-files built with gcc version 3.4 or later cannot be used in versions of MATLAB earlier than V7.2 (R2006a).

MEX-Files in MATLAB® for Microsoft® Windows® x64

With the introduction of MATLAB for Windows® x64, you can now build 64-bit MEX-files. These MEX-files have the extension .mexw64. The mexext command returns mexw64 in MATLAB for Windows x64.

Compatibility Considerations

MEX-files built using MATLAB for Windows (32-bit), which have.mexw32 extensions by default, cannot be used in MATLAB for Windows x64.

By default, when MATLAB for Windows x64 is installed, the mex.pl and mex.bat scripts build MEX-files for a Windows x64 platform (with .mexw64 extensions).

New Microsoft® and Intel® Compilers Supported

MATLAB V7.2 (R2006a) supports new compilers for building MEX-files on Windows and Windows x64 platforms:

Environment Variables Needed for Intel® Visual Fortran

When you build a MEX-file or an Engine or MAT application using Intel Visual Fortran 9.0, MATLAB requires an environment variable to be defined, depending on whether you are building in MATLAB for Windows (32-bit) or MATLAB for Windows x64:

MWPOINTER Macro for Platform-Independent Fortran Code

MATLAB provides a preprocessor macro, mwPointer , that declares the appropriate Fortran type representing a pointer to an mxArray or to other data that is not of a native Fortran type, such as memory allocated by mxMalloc. On 32-bit platforms, the Fortran type that represents a pointer is INTEGER*4; on 64-bit platforms, it is INTEGER*8. The Fortran preprocessor translates MWPOINTER to the Fortran declaration that is appropriate for the platform on which you compile your file.

Compaq® Visual Fortran Engine and MAT Options File Renamed

MATLAB V7.1 (R14SP3) included a Windows Engine and MAT options file named df66engmatopts.bat. This file contained options for Compaq® Visual Fortran version 6.6 for use in building Fortran engine or MAT stand-alone programs. The file name df66engmatopts.bat originated with an earlier version of the Fortran compiler, named Digital Fortran.

In V7.2 (R2006a), this file has been renamed cvf66engmatopts.bat to match the Compaq Visual Fortran product name.

Compatibility Considerations

You may need to change any scripts that depend on the earlier name for the options file.

Options Files Removed for Unsupported Compilers

MATLAB V7.1 (R14SP3) included MEX, Engine, and MAT options files for a number of Windows C and Fortran compilers that were untested. These options files are not included in V7.2 (R2006a). The unsupported compilers, and the supported compilers that replace them, are:

Unsupported Compiler

Supported Replacement

Borland® 5.0, 5.2, 5.3, 5.4

Borland 5.5, Borland 5.5 Free, Borland 5.6

Digital Visual Fortran 5.0, 6.0

Compaq Visual Fortran 6.1, Compaq Visual Fortran 6.6, Intel Visual Fortran 9.0

Microsoft Visual C++ 5.0, Visual C++ .NET 2002 (7.0)

Microsoft Visual C++ 6.0, Visual C++ .NET 2003 (7.1), Visual C++ 2005 (8.0)

Watcom 10.6, 11

Open Watcom 1.3

Compatibility Considerations

If you were using an untested compiler with a previous version of MATLAB, replace it with a supported compiler. You may need to recompile your MEX-files or applications.

Obsolete Functions No Longer Documented

In V7.1 (R14SP3), many MAT-file access, MX array manipulation, MEX-files, and MATLAB engine functions were declared obsolete in the External Interfaces Reference documentation. These functions are no longer documented in V7.2 (R2006a).

This section lists the obsolete functions removed from the documentation, along with replacement functions, if any.

Obsolete Functions: MAT-File Access

Obsolete Function

Replacement

matDeleteArray (C and Fortran)

matDeleteVariable

matDeleteMatrix (C and Fortran)

matDeleteVariable

matGetArray (C and Fortran)

matGetVariable

matGetArrayHeader (C and Fortran)

matGetVariableInfo

matGetFull (C and Fortran)

matGetVariable followed by mxGetM, mxGetN, mxGetPr, mxGetPi

matGetMatrix (C and Fortran)

matGetVariable

matGetNextArray (C and Fortran)

matGetNextVariable

matGetNextArrayHeader (C and Fortran)

matGetNextVariableInfo

matGetNextMatrix (C and Fortran)

matGetNextVariable

matGetString (C and Fortran)

matGetVariable followed by mxGetString

matPutArray (C and Fortran)

matPutVariable

matPutArrayAsGlobal (C and Fortran)

matPutVariableAsGlobal

matPutFull (C and Fortran)

mxCreateDoubleMatrix followed by mxSetPr, mxSetPi, matPutVariable

matPutMatrix (C and Fortran)

matPutVariable

matPutString (C and Fortran)

mxCreateString followed by matPutVariable

Obsolete Functions: MX Array Manipulation

Obsolete Function

Replacement

mxClearLogical (C and Fortran)

None

mxCreateFull (C and Fortran)

mxCreateDoubleMatrix

mxCreateScalarDouble (C and Fortran)

mxCreateDoubleScalar

mxFreeMatrix (C and Fortran)

mxDestroyArray

mxGetName (C and Fortran)

None

mxIsFull (C and Fortran)

mxIsSparse

mxIsString (C and Fortran)

mxIsChar

mxSetLogical (C and Fortran)

None

mxSetName (C and Fortran)

None

Obsolete Functions: MEX-Files

Obsolete Function

Replacement

mexAddFlops (C)

None

mexGetArray (C and Fortran)

mexGetVariable

mexGetArrayPtr (C and Fortran)

mexGetVariablePtr

mexGetEps (C and Fortran)

mxGetEps

mexGetFull (C and Fortran)

mexGetVariable followed by mxGetM, mxGetN, mxGetPr, mxGetPi

mexGetGlobal (C and Fortran)

mexGetVariablePtr

mexGetInf (C and Fortran)

mxGetInf

mexGetMatrix (C and Fortran)

mexGetVariable

mexGetMatrixPtr (C and Fortran)

mexGetVariablePtr

mexGetNaN (C and Fortran)

mxGetNaN

mexIsFinite (C and Fortran)

mxIsFinite

mexIsInf (C and Fortran)

mxIsInf

mexIsNaN (C and Fortran)

mxIsNaN

mexPutArray (C and Fortran)

mexPutVariable

mexPutFull (C and Fortran)

mxCreateDoubleMatrix followed by mxSetPr, mxSetPi, mexPutVariable

mexPutMatrix (C and Fortran)

mexPutVariable

Obsolete Functions: MATLAB® Engine

Obsolete Function

Replacement

engGetArray (C and Fortran)

engGetVariable

engGetFull (C and Fortran)

engGetVariable followed by mxGetM, mxGetN, mxGetPr, mxGetPi

engGetMatrix (C and Fortran)

engGetVariable

engPutArray (C and Fortran)

engPutVariable

engPutFull (C and Fortran)

mxCreateDoubleMatrix followed by mxSetPr, mxSetPi, engPutVariable

engPutMatrix (C and Fortran)

engPutVariable

engSetEvalCallback (C)

None

engSetEvalTimeout (C)

None

engWinInit (C)

None

Compatibility Considerations

Most of the functions listed as obsolete in this section are unsupported in V6.5 (R13) and later versions. Some obsolete functions are unsupported in earlier versions.

If this section lists a replacement for an obsolete function, change any code that refers to the obsolete function to use the replacement instead.

If you must use an obsolete function in a MEX-file or application, use the -V5 option to mex when you build the file.

Support for Licensed ActiveX® Controls

MATLAB supports the use of Microsoft® ActiveX® controls that require licensing at both design time and runtime.

See the actxcontrol function for information on how to specify a design-time license key.

See Deploying ActiveX® Controls Requiring Run-Time Licenses for information on how to use ActiveX® Controls that require runtime licenses in your MATLAB application.

Support for VT_Date Type

MATLAB defines a data type to be used with controls requiring input defined as type VT_DATE. See Using Date Data Type for more information.

Dynamic Linking of External Libraries

MATLAB supports dynamic linking of external libraries only on 32-bit Windows systems and 32-bit Linux systems. See MATLAB® Interface to Generic DLLs for more information.


[1] Linux is a registered trademark of Linus Torvalds.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS