External Interfaces/API, MATLAB® Version 7.5 (R2007b)

Support for 64-bit mxArrays

MATLAB® Version 7.5 (R2007b) supports 64-bit mxArrays. This change allows C/C++ and Fortran files built on 64-bit platforms to handle large data arrays.

In earlier versions of MATLAB, mxArrays are limited to 231-1 elements. In Version 7.5 (R2007b) your mxArray can have up to 248-1 elements.

The mex command option, -largeArrayDims, uses the large-array-handling mxArray API. Use mwSize to represents size values, such as array dimensions and number of elements. Use mwIndex to represent index values, such as indices into arrays.

Compatibility Considerations

MEX-files that built properly in previous versions of MATLAB continue to build in Version 7.5 (R2007b).

The default option for mex is -compatibleArrayDims. If you use this option, mex builds the files using the 32-bit array-handling API.

To work with 64-bit mxArrays, your C, C++ and Fortran source code must comply with the 64-bit array-handling API. To use the API to create C/C++ MEX-files, see Handling Large mxArrays . To use the API to create Fortran MEX-files, see Handling Large mxArrays .

Fortran MEX-Files Will Require mwSize and mwIndex

In a future version of MATLAB, the default mex command option will change to -largeArrayDims. Fortran MEX-files will be required to use the mwSize and mwIndex preprocessor macros

Compatibility Considerations

To make your Fortran MEX-file compatible with the -largeArrayDims option, and to create platform-independent code, you need to include the fintrf.h header file in your Fortran source files, and you need to name your source files with an uppercase .F file extension. For information on creating MEX-files, see the Gateway Routine in the Fortran MEX-Files topic.

Changes to the MATLAB® Locale Setting

Retrieving and using the proper locale setting is a mandatory operation in creating and using applications for international audiences. In R2007b, MATLAB Version 7.5 standardizes the way it initializes the locale setting across platforms. As a result, on Microsoft® Windows® platforms, MEX-files that use C/C++ locale-dependent standard library functions should note that MATLAB now sets the locale using the setlocale function.

Because of changes to Microsoft® Visual Studio®, MEX-Files created on Windows with dMicrosoft Visual Studio 2003 will not have the same locale setting as MATLAB Version 7.5 (R2007b).

Changes to MEX Error-Handling Functions mexErrMsgTxt and mexErrMsgIdAndTxt

In MATLAB Version 7.5 (R2007b). the mexErrMsgTxt and mexErrMsgIdAndTxt functions determine where the error occurred, and display the function name. In previous versions, these functions only display the error message.

For example, if an error occurs in the function foo, mexErrMsgTxt and mexErrMsgIdAndTxt display the following information before the error message:

??? Error using ==> foo

Rebuild MEX-Files Created with MATLAB® Versions Earlier Than V7 (R14)

To work with MATLAB V7.5 (R2007b), MEX-files compiled on any platform with MATLAB versions earlier than V7 (R14) no longer load correctly and must be rebuilt.

Changes to Compiler Support

The set of compilers that MATLAB supports has changed in MATLAB Version 7.5 (R2007b). For an up-to-date list of supported compilers, see Technical Note 1601: http://www.mathworks.com/support/tech-notes/1600/1601.html.

New Compiler Support

MATLAB V7.5 (R2007b) supports new compilers for building MEX-files.

Windows® platforms.  

Sun™ Solaris™ SPARC® (64-bit) platform.  

Discontinued Compiler Support

The following compilers are no longer supported.

Windows® platforms.  

Solaris™SPARC® (64-bit) platform.  

Compatibility Considerations.   To ensure continued support for building your C/C++ programs, consider upgrading to another supported compiler. For an up-to-date list of supported compilers, see Technical Note 1601: http://www.mathworks.com/support/tech-notes/1600/1601.html.

Compiler Support to Be Phased Out

The following compilers are supported in Version 7.5 (R2007b), but will not be supported in a future version of MATLAB.

Windows® (32-bit) platform.  

Changes to Applications Built with Borland® 5.5 or 5.6 C Compilers

MATLAB applications built with Borland Version 5.5 or 5.6 C compilers have changed in MATLAB Version 7.5 (R2007b). MATLAB applications that run under Windows are now implemented as console applications, not Windows applications.

Compatibility Considerations

If you have customized the build process based on one of the bcc*engmatopts.bat options files, you must edit this file making changes to the appropriate LINKFLAGS statement, as described in the .bat file comments.

Environment Variable Required for mex with Microsoft® Platform SDK Compiler

When you build a MEX-file, an engine application, or a MAT application on a Windows 64-bit platform using the Microsoft Platform SDK compiler, MATLAB requires that you define the environment variable MSSdk. The value of this environment variable is the path to the installation directory for Microsoft Platform SDK. The Microsoft Platform SDK installation program does not commonly define this environment variable. For example, you might set the environment variable as follows:

C:\Program Files\Microsoft Platform SDK

Environment Variables Required for mex with Intel® Visual Fortran 9.0

When you build a MEX-file, an engine application, or a MAT application using Intel Visual Fortran 9.0, MATLAB requires that you define an environment variable for the Windows platform you are using.

Windows® (32-bit) platform

Define the environment variable VS71COMNTOOLS. The value of this environment variable is the path to the Common7\Tools directory of the Visual Studio® .NET 2002 or 2003 installation directory. (Intel Visual Fortran requires Visual Studio .NET 2002 or 2003 on 32-bit Windows platforms.) The Visual Studio .NET 2003 installation program commonly defines this environment variable. For example, you might set the environment variable as follows:

C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools

Windows® x64 platform

Define the environment variable MSSdk. The value of this environment variable is the path to the installation directory for Microsoft Platform SDK for Windows Server® 2003. (Intel Visual Fortran requires Microsoft Platform SDK for Windows Server 2003 on Windows x64 platforms.) The Microsoft Platform SDK installation program does not commonly define this environment variable. For example, the environment variable might have the value

C:\Program Files\Microsoft Platform SDK

Changes to Handling ActiveX® Methods

In MATLAB Version 7.4 (R2007a), a change was made to Microsoft® ActiveX® methods which was not documented in the release notes. This change is described in Changes to Handling Microsoft® ActiveX® Methods in the MATLAB Release Notes, Version 7.4 (R2007a).

Changes to Dynamic Data Exchange (DDE) Documentation

In MATLAB V5.1, all development work for the Dynamic Data Exchange (DDE) server and client was stopped. This functionality is no longer documented in V7.5 (R2007b). The MathWorks provides, instead, a MATLAB interface to COM technology that is documented in COM Support for MATLAB® Software.

Obsolete Functionality No Longer Documented

Documentation for Dynamic Data Exchange (DDE) is no longer included in External Interfaces.

Compatibility Considerations.   If you must support this obsolete functionality, we suggest you print a copy of the External Interfaces chapter "COM and DDE Support (Windows Only)" from MATLAB V7.4 (R2007a) or earlier.

Documentation for Obsolete Functions To Be Phased Out

Documentation for the following functions is included in the MATLAB Function Reference documentation for MATLAB V7.5 (R2007b), but will not be included in a future version of MATLAB.

Obsolete Functions

ddeadv

ddeexec

ddeinit

ddepoke

ddereq

ddeterm

ddeunadv

The following syntax for enableservice, included in the MATLAB Function Reference documentation for MATLAB V7.5 (R2007b), will be removed from the documentation.

enableservice('DDEServer',enable)

Compatibility Considerations.   If you must support this obsolete functionality, we suggest you print and keep a copy of the relevant MATLAB function reference pages from V7.5 (R2007b) or earlier.

  


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