mex文件 编译调试环境配置 vc

To build MEX-files with the Microsoft Visual C++ integrated development environment:  
  谄媚 Create a project and insert your MEX source  into it. 
  谄媚 Create a  .DEF file to export the MEX entry point. 
    For example 
        LIBRARY MYFILE.DLL
        EXPORTS mexFunction  
        <-- for a C MEX-file
  谄媚 Add the .DEF file to the project.
  谄媚 Locate the .LIB files for the compiler version you are using under 
                   matlabroot\extern\lib\win32\microsoft. 
 谄媚 From this directory, add libmx.lib, libmex.lib, and libmat.lib to the library modules in the LINK settings option. 
  谄媚 Add the MATLAB include directory, MATLAB\EXTERN\INCLUDE to the include path in the Settings C/C++ Preprocessor option.  
 谄媚 Add MATLAB_MEX_FILE to the C/C++ Preprocessor option by selecting Settings from the Buildmenu, selecting C/C++, and then typing ,MATLAB_MEX_FILE after the last entry in the Preprocessor definitions field.//可以不要
  谄媚  To debug the MEX-file using the IDE, put MATLAB.EXE in the Settings Debug option as theExecutable for debug session.

你可能感兴趣的:(Microsoft,File,matlab,include,compiler,preprocessor)