The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]
Gary Levenson

Posts: 27
Registered: 12/7/04
Re: C++ MEX/DLL in Matlab 5
Posted: May 16, 1997 3:25 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

In article <5lenlv$i5g$>, 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

Feel free to contact me directly if you have questions.


Gary Levenson
The MathWorks, Inc.

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.