LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Call Library Function" Crashes LabView

I am experiencing a problem with the LabView “Call Library Function." I have compiled the c++ code and created a DLL with the Cygwin compiler. When I attempt to configure using the Call Library Function dialog box, LabView always hangs after clicking “OK." LabView locks up with a “(Not Responding)” message on the front panel window. The C++ function prototype I am using is:  

   double elfDecimate(double signalValue, unsigned int sampleCnt, unsigned short deltaCnt);

 

I am running LabView 8.6 on a Dell Core2 Inspiron 9400 laptop with Windows XP Professional. I am attaching my source, header and makefile.

 

Download All
0 Kudos
Message 1 of 3
(2,480 Views)
LabVIEW does not support C++ DLLs. If you write your code with a C++ compiler then you need to make sure that you adorn your functions using extern "C". See Building a DLL with Visual C++. It's for Visual C++, but the same concepts apply.
Message 2 of 3
(2,472 Views)

smercurio is correct. That Developer Zone Tutorial should help you out.

 

If you wish to program entirely in C++, we do offer Measurement Studio, of course.

Jeff | LabVIEW Software Engineer
0 Kudos
Message 3 of 3
(2,444 Views)