How can I use MBUILD to compile a shared library in MATLAB Compiler R2014a?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 C Shared Library Integration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!