External Interfaces/API, MATLAB® Version 7.6 (R2008a)

Interface to Generic DLLs Supported on 64-bit Platforms

The ability to load a generic DLL on 64-bit platforms using loadlibrary is available in MATLAB® Version 7.6 (R2008a).

Compatibility Considerations

You must install a C compiler and Perl to use this feature. For a list of supported compilers and how to install them, see Using loadlibrary on 64-Bit Platforms.

Changes to Compiler Support

The set of compilers that MATLAB supports has changed in MATLAB Version 7.6 (R2008a). 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 Version 7.6 (R2008a) supports new compilers for building MEX-files.

Microsoft® Windows® (64-bit) platform.  

Windows® (32-bit) platform.  

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

Macintosh® (Intel®-based 32-bit) platforms.  

Discontinued Compiler Support

The following compilers are no longer supported.

Windows® platforms.  

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.6 (R2008a), but will not be supported in a future version of MATLAB.

Windows® (32-bit) platform.  

Solaris™ SPARC® (64-bit) platform.  

New Version of Perl on Windows® Platforms

MATLAB Version 7.6 (R2008a) includes Perl on Windows Version 5.8.8.

Compatibility Considerations

Prior to this release, MATLAB contained Perl Version 5.005. Consult your Perl documentation for details on the changes between Perl versions.

Rebuild MEX-Files Created on Linux® Platforms

MATLAB V7.6 (R2008a) on Linus Torvalds' Linux® platforms is built with a compiler that utilizes glibc Version 2.3.6.

Compatibility Considerations

To work with MATLAB V7.6 (R2008a), MEX-files compiled on a Linux platform must be rebuilt.

Use mxDestroyArray to Release Memory for mxArray

The documentation for the mxSetCell, mxSetField, and mxSetFieldByNumber functions in the MATLAB C and Fortran API incorrectly instructs customers to use mxFree to release memory for any mxArray returned by mxGetCell, mxGetField, or mxGetFieldByNumber.

Compatibility Considerations

The correct function to use is mxDestroyArray. Calling mxFree on an mxArray only frees the array header, but does not actually free the data itself and can result in a memory leak.

To help diagnose this problem, MATLAB issues a warning if calling mxFree on an mxArray could cause memory corruption. In future versions of MATLAB, this condition may result in a segmentation violation.

Do Not Use get or set Function to Manage Properties of Java™ Objects

If you want to read or update a property of a Sun Java™ object created in MATLAB using the Java class constructor, do not use the MATLAB get or set functions on the property. For example, if you create a Java object called javaObject that has a property called PropertyName, the following commands may cause memory leaks and will be deprecated in a future version of MATLAB:

propertyValue = get(javaObject, 'PropertyName'); 
set(javaObject, 'PropertyName', newValue);

Compatibility Considerations

The correct commands to use are:

propertyValue = javaObject.getPropertyName;
javaObject.setPropertyName(newValue);

For information to help you analyze your code, see Technical Support solution 1-5LY639. In future versions of MATLAB, using get or set on Java objects to manage the properties will generate an error.

New mxArray Functions for Use with MATLAB® Class Objects

You can read and modify properties of MATLAB class objects using the mxGetProperty and mxSetProperty functions.

mex.bat File Removed from matlabroot\bin\$ARCH

Beginning with MATLAB Version 7.3 (R2006b), the Windows script mex.bat is located in the directory matlabroot\bin. Copies of this file were also in the directory matlabroot\bin\$ARCH. In MATLAB Version 7.6 (R2008a), mex.bat is only located in matlabroot\bin.

Compatibility Considerations

If you did not make the updates described in Location of mex.bat File Changed, you may need to make changes now.

Run-time Libraries Required for Applications Built with Microsoft® Visual Studio® 2008 Compiler

If you distribute a MEX-file, an engine application, or a MAT-file application built with the Visual Studio® 2008 compiler, you must provide the Visual C++® run-time libraries. These files are required to run applications developed with Visual C++ on a computer that does not have Visual C++ 2008 installed. For information on locating the Microsoft® Visual C++® 2008 Redistributable Package (x86), containing vcredist_x86.exe and vcredist_x64.exe, consult your Microsoft® documentation.

Environment Variables Required 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 Microsoft 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

-largeArrayDims Option to MEX Will Become Default

In a future version of MATLAB, the default mex command will change to use the large-array-handling API. This means the -largeArrayDims option will be the default. For information about migrating your MEX-files to use the large-array-handling API, see the Technical Support solution 1-5C27B9.

Compatibility Considerations

In the near future you will be required to update your code to utilize the new API. You should review your source MEX-files and mex build scripts.

Changes to Dynamic Data Exchange (DDE) Documentation

In MATLAB Version 5.1, all development work for the Dynamic Data Exchange (DDE) server and client was stopped. 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 the following functions no longer included in External Interfaces.

Obsolete Functions

ddeadv
ddeexec
ddeinit
ddepoke
ddereq
ddeterm
ddeunadv

The following syntax for enableservice no longer included in External Interfaces.

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