04-10-2013 02:27 AM
hello,
I want to integrate a dll compiled with matlab in a labwindowsCVI project. i have installed matlab runtime r2012b on my pc and add the dll library, mclmcrrt.lib and paths of .h files to the project. I have also included paths « C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\extern\include » and « C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\extern\lib\win32\microsoft » to the project.
when compile the project i got this project link error: undefined symbole '_mclInitializeApplication_proxy@8' reference in .c
in mclmcrrt.h i found this #undef mclInitializeApplication #define mclInitializeApplication mclInitializeApplication_proxy
i do include mclmcrrt.h in file .c, could anyone help me with this problem?
04-11-2013 03:09 AM
Bonjour Jdorne,
Il faut savoir que CVI utilise aussi le compilateur "lcc", comme vous pouvez le voir sur cette documentation:
http://digital.ni.com/public.nsf/allkb/A87F4E249F1929ED86257117004C34E8?OpenDocument
Ensuite concernant l'appel de DLL sous CVI vous avez ce lien :
http://zone.ni.com/devzone/cda/tut/p/id/3341#toc4
Ce qu'il faut noter c'est :
"Because LabWindows/CVI is an ANSI C compiler, it can call only functions that have been exported as C-style functions. "
Un forum à déja était posté concernant la création et l'utilisation de dll Matlab sous CVI.
Je vous invite à le consulter.
Je vous souhaite une bonne journée,
Cordialement,
04-11-2013 03:45 AM
Hello Jdorne,
You should know that CVI uses the "lcc" compiler, as you can see from this documentation:
http://digital.ni.com/public.nsf/allkb/A87F4E249F1929ED86257117004C34E8?OpenDocument
Regarding the call of the DLL in CVI :
http://zone.ni.com/devzone/cda/tut/p/id/3341#toc4
What should be noted is:
"Because LabWindows / CVI is an ANSI C compiler, it can only call functions That Have Been Exported as C-style functions."
A forum was already posted on the creation and use of Matlab dll in CVI.
I invite you to consult it.
I wish you a good day,
Sincerely,