Create C\C++ DLL from MatLab Compiler 4.6 (R2007a)
이전 댓글 표시
Hello,
I am beginner in MatLab.
My question is : What are the steps to create a shared DLL, who can be used in other application (like NI LabView, or NI TestStand) ?
I saw lot of documentation, but there were for MatLab Compiler 2 or 3). Other trick that I saw on http://www.mathworks.fr/help/toolbox/compiler/bsl9c8_.html or http://www.mathworks.fr/help/toolbox/compiler/btdxt02-1.html or http://www.labviewpro.net/upfiles/dllmatlablabview.pdf do not compile.
I tryed to maked a DLL from a simply MatLab code, like function y = foo(x) y = 2*x in a file named foo.m. I know that I have to do a wrapper, but I don't exactly understand the steps, because I have to do a C\C++ DLL for a more complicated function.
I am searching the way to do that. Do you have the process? And the wrapper file associated?
I am sure it will help lot of other people, Thanks a lot,
Flo,
답변 (2개)
Kaustubha Govind
2012년 4월 12일
0 개 추천
You mean that you want to call the MATLAB Compiler generated DLL from another DLL right? I don't have any experience with this, but there is a Technical Solution that explains the process: How do I wrap MATLAB Compiler created C DLLs to create another DLL?
Florian
2012년 4월 12일
0 개 추천
댓글 수: 1
Kaustubha Govind
2012년 4월 12일
Look at this page for an example of generating a DLL from MATLAB code and using it in a C/C++ executable: http://www.mathworks.com/help/toolbox/compiler/f2-972343.html
Not sure how things will work in LabVIEW, I've never tried that before. Also, if you are using LabVIEW on the same machine where MATLAB is installed, using the MATLAB script node might be a better option: http://zone.ni.com/reference/en-XX/help/371361B-01/lvhowto/creating_a_matlab_script/
카테고리
도움말 센터 및 File Exchange에서 LabVIEW에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!