THis is my first time n this form, Hopefully I am doing this right and I'm in the right place to ask the right question,
I have a problem importing my VC++ dll to labview using the tools>> import>>shared library.
The Issue is:-
When I navigate import>> shared library and follow the wizard and select my dll and my header file and hit next I can't see the functions in the my library. However if i go back and select shared library not in local machine and hit next I can see all the functions in my header files (which is a good step). but after following the wizard and it creates the subvi for my funcation and try to use it it errors out the following error
"Call Library Function Node "Mydll" myfunction: function not found in library" The function name specified for this node cannot be found in the library. Right-click the Call Library Function node and select Configure, then choose the correct function name
I know that in my dll I have to instantiate an object then call my function as following :-
But I'm not sure how can i do that in Labview because the wizard generates subvis that calls myfunction"
Anyone here can help ? and I would like to find a solution without needing to write a C wrapper , I am sure there must be away to do that ????
The LabVIEW Call Library Node can NOT interface to C++ libraries. You have to create global accessor functions for any method or property of an object that you want to call and global functions that instantiate an object.
In addition you have to make sure to install on the target system any other dependencies your DLL may have such as the Visual C runtime library and other libraries your DLL may access. As a side not, debug builds of your DLL can only be executed on a system that has a full Visual C IDE installed as there are no redistributable runtime installers for the debug version.