Create C\C++ DLL from MatLab Compiler 4.6 (R2007a)
Mostra commenti meno recenti
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,
Risposte (2)
Kaustubha Govind
il 12 Apr 2012
0 voti
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 Commento
Florian
il 12 Apr 2012
Florian
il 12 Apr 2012
0 voti
1 Commento
Kaustubha Govind
il 12 Apr 2012
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/
Categorie
Scopri di più su LabVIEW in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!