Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.
|
|
|
Re: C++ MEX/DLL in Matlab 5
Posted:
May 19, 1997 10:23 AM
|
|
Gary Levenson wrote: > > In article <5lenlv$i5g$1@trog.dra.hmg.gb>, sawatts@dra.hmg.gb says... > > Has anybody had any luck in joy in compiling a C++ MEX/DLL for Matlab 5 > > (WinNT 4)? > > > > Yes. Can you describe what type of trouble you ran into? I've created S- > Function mex-files, but a regular MEX DLL is pretty much the same. > > It was actually easier to get this working with Visual 5 since it defines > the BOOL datatype. The mex.h include file is already setup to deal with > C++ compilers, so wrapping mex.h in extern "C" isn't necessary. > > You will need to define MATLAB_MEX_FILE, include matlab.lib in the > project, and use a .def file unless the mexFunction is explicitly > exported. > > Feel free to contact me directly if you have questions. > > -Gary > > -- > Gary Levenson > The MathWorks, Inc. > www.mathworks.com
NOTE: That if you are compiling with a compiler that does not support the BOOL datatype, you can use the preprocessor directive NO_BUILT_IN_SUPPORT_FOR_BOOL. See mex.h for more information.
-- Craig Ciquera The Mathworks, Inc.
|
|
|
|