This enhancement has been incorporated in Release 2006a (R2006a). For previous product releases, read below for any possible workarounds:
If your Fortran compiler supports preprocessing, use the MWPOINTER macro instead of INTEGER to declare mxArrays and other MATLAB pointer types. The Fortran preprocessor converts MWPOINTER to INTEGER*4 on 32-bit platforms and INTEGER*8 on 64-bit platforms.
To use MWPOINTER, you must include the following line in your Fortran source file:
For examples of use of MWPOINTER, open any of the files with the extension .F in the directory $MATLAB\extern\examples (where $MATLAB is the MATLAB root directory on your machine, as returned by typing
at the MATLAB command prompt.)