Using a shared .dll library while making an executable
조회 수: 1 (최근 30일)
이전 댓글 표시
So i know in order to use the 'loadlibrary' function you need a c compiler. But what if i turn the matlab code calling the 'loadlibrary' function into an executable program and that program is used on a computer without a c compiler?
I am using 3 functions from a .dll library, but do not actually have the .c code, otherwise i could just make a mex function using the .c files.
Is it possible to compile a mex64 function with only the .dll library file, and the header file? If not is it possible to write a mex function that uses those files? I want to make the program as versitile as possible, but it needs to be called in matlab.
If anyone has any ideas on what a good way to approach this problem, or general info i would be very thankful.
댓글 수: 0
채택된 답변
Walter Roberson
2013년 6월 15일
loadlibrary(libname,@protofile)
You can see how to generate the prototype file at http://www.mathworks.com/help/matlab/matlab_external/create-alias-function-name-using-prototype-file.html
That is, in a setup run on the development machine you would use the .h to generate the protofile; then the code you would compile would use the @protofile syntax on the already-generated file.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!