Matlab中输入help mexext命令:
mexext MEX filename extension for this platform, or all platforms.
EXT = mexext returns the MEX-file name extension for the current
platform.
ALLEXT = mexext('all') returns a struct with fields 'arch' and 'ext'
describing MEX-file name extensions for all platforms.
There is a script named mexext.bat on Windows and mexext.sh on UNIX
that is intended to be used outside MATLAB in makefiles or scripts. Use
that script instead of explicitly specifying the MEX-file extension in
a makefile or script. The script is located in $MATLAB\bin.
注释:EXT = mexext,mexext返回的是当前平台的mex文件的扩展名,例如我的是Windows7 64位系统,返回的是mexw64, ALLEXT = mexext('all')返回的是所有平台的mex文件扩展名,保存在一个结构体中,结构体成员有arch和ext,ext中有mexglx,Linux下的扩展名,mexa64(好像也是Linux平台下的),mexmaci64,苹果系统下的,mexw32,mexw64,32、64对应的是32位,64位系统,w为windows
mexext和mex命令都是一个脚本文件,在windows后缀名为.bat,在linux中为.sh,是用来调用外部命令的,具体了解的可以看一下matlab和c,c++混合编程