How can I use MBUILD to compile a shared library in MATLAB Compiler R2014a?
1 view (last 30 days)
Show older comments
Hello,
I wanted to write a c wrapper for my compiled matlab functions into a (matlab)dll and compile the c-wrapper into a (c)dll for furhter use.
In previous MATLAB Compiler versions I used MBUILD in combination with an .exports-file to compile shared libraries, for example:
mbuild myLibrary.c myLibrary.exports And this worked fine, if I now try to do the same in release R2014a however, I receive the following error:
Error using mbuild (line 164)
Unable to complete successfully.
Unknown file extension '.exports'.
If found a solution here:
However this seems fairly complicated to me compared to the previous version with mbuild. Can someone explain me with an example in which files I have to add what and how to compile everything into a cdll with mbuild?
Currently I have the following files:
- sumc.m and multiplyc.m compiled into a C++ shared library: libfunc.cpp, libfunc.def, libfunc.dll, libfunc.exp, libfunc.exports, libfunc.h, libfunc.lib
- cwrapper.cpp which includes libfunc.h and iostream and has two functions: double wrapper_main( ) and void fill( ) (subfunction for copying data)
As I can't compile this wrapper into a c dll the old way, what do I have to add to make this work?
Any help is appreciated!
Kind regards, bvrm
0 Comments
Answers (1)
See Also
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!