LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Library Function Node: Instantiate a class/handle constructors in a C++ Shared Library?

I have a large body of code that is already written (in C++) and would like to call functions from that compliled shared library to wrap and unwrap a communication protocol, except they are not simple functions.  They involve classes and constructors.  Can I instantiate a class and/or handle constructors through the Call Library Function Node?  If so, how?  I am working with LabVIEW 6.1 on a Mac platform.

Thanks,
Nathan Fast
JPL
0 Kudos
Message 1 of 3
(3,663 Views)

Hello,

You will not be able to call C++ class methods directly using a call library function node - you'll have to create wrapper functions.

The following thread has more details:

http://forums.ni.com/ni/board/message?board.id=231&message.id=4062&requireLogin=False

Best Regards,

JLS

Best,
JLS
Sixclear
0 Kudos
Message 2 of 3
(3,642 Views)
Thank you.  This is also what we have been thinking - to create a wrapper function that we will call from LabVIEW that can insantiate the classes for us.  The other option would be for us to rewrite the library without classes, which would take much longer.

Nathan
0 Kudos
Message 3 of 3
(3,639 Views)