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
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?

댓글 수: 1

Florian
Florian 2012년 4월 12일
However, I will take a look at your link. Thank you.

댓글을 달려면 로그인하십시오.

Florian
Florian 2012년 4월 12일

0 개 추천

Please apoligize for my english.
No, I think it is not exactly that.
I would like to : -Make a function in a matlab file, my_function.m -Create a DLL (my_function.dll) from my_function.m, with wrapper or not, I don't know - Exploit my_function.dll in any C\C++ application, and in LabView.
Thanks for your replay.

댓글 수: 1

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에 대해 자세히 알아보기

질문:

2012년 4월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by