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 件のコメント

Kaustubha Govind
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/

サインインしてコメントする。

カテゴリ

質問済み:

2012 年 4 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by