Hi, I Have Done a test for create .m file to .dll to use in msvc 6.0. I put here with step by step of procedure, and hope it could help. 1. You need to have the matlab C / C library and . MATLAB Compiler in your computer 2. Set up your project in MSVC for working with MATLAB C Library Follow the instruction at:. http://www.mathworks.com/support/solutions/data/27257.shtml 3. Create the. Dll file from matlab mathworks.com/support/solutions/data/27671.shtml 4. Add the .dll in the appropriate Directory and build your .exe file in msvc . jackphan /// // EXAMPLE STEP BY STEP FOR CREATING .dll FILES USING 1.I have created the file mySquare.m in folder myMatlab (code in step 9) 2.Create the command line to get lib file D:. / MyDocuments / MathLab / MatlabC / myMatlab> mcc -t -LC -W lib: mySquarelib -T link: lib mySquare.m libmmfile.mlib 3.It will create 9 files: mySquare.c mySquare.h mySquarelib.c mySquarelib.h mySquarelib.exports mySquarelib.dll Mysquarelib.ex p mySquarelib.lib mySquarelib.mlib 4.Add the file mySquarelib.h into project 5.Create a new folder MyAddingLib in C: / matlabR12 / extern / lib / win32 then copy file mySquarelib.lib into it 6.Add, C: / matlabR12 / extern / lib / win32 / MyAddingLib into Additional library path (click Project Setting in MSVC menu, click Link, Input (in Category) (note: separated by comma) 7.Add mySquarelib.lib into Object / library modules: (note : No Comma, Separated By a Space (Click Project Setting In MSVC
menu, click Link, Input (in Category) 8.Add the file mySquarelib.dll into project Debug folder (example: my project name is Work02) or if you want you could add the file mySquarelib.dll into C: / matlabR12 / extern / lib / win32 9.this is my m-file (mysquare.m) function y = mysquare (x) y = x * x; 10.This is a project file cpp // Test.cpp #include