Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: C++ MEX/DLL in Matlab 5
Replies: 3   Last Post: May 22, 1997 11:47 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Craig Ciquera

Posts: 22
Registered: 12/7/04
Re: C++ MEX/DLL in Matlab 5
Posted: May 19, 1997 10:23 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.