Can I call an external shared library (DLL) from a MATLAB MEX-file?

49 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 11 Apr 2019
Edited: MathWorks Support Team on 11 Apr 2019
To link an external DLL to a MEX-file, list the DLL's .lib file on the command line.
Here is an example:
mex filename.c libname.lib
Note that when calling the MEX-file from MATLAB, the DLL should be in the same directory as the MEX-file.
  3 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Products


Release

No release entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!