LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call library function node - function not found

Solved!
Go to solution

When creating a DLL I get a the Labview error "Call Library Function Node "LabviewReceiverDLL.dll:readDataJ1939Data' Function not found. Everything looks correct to me and this used to work, though I've changed computers since then.

 

This is the beginning of my C++ code just to show my function name. I've also attached the Call Library Function Window to show my setup.

Thank you in advance for your help.

 

#include"StdAfx.h"

#include<iostream>

/* Call Library source file */

 

extern"C"__declspec(dllexport)unsignedint readDataJ1939Data(unsignedint, unsignedint, unsignedchar, unsignedchar* canData, unsignedchar* path);

 

unsigned int readDataJ1939Data(unsignedint ulTimeStamp, unsignedint ulIdentifier, unsignedchar uiDataCount, unsigned char* canData, constchar* path)

{

 

0 Kudos
Message 1 of 6
(2,934 Views)

You mention that you have changed computers and that it used to work before.

Could it be that there is another (older) copy of the DLL on this computer, and LabVIEW is loading the wrong one?

 

The simplest way to check is to close your VI and delete the one you are expecting it to use.  Then open the VI again; if LabVIEW doesn't ask you where the DLL is, it is loading it from somewhere else.

 

Batya

0 Kudos
Message 2 of 6
(2,889 Views)

Thanks for your reply Batya. I did try removing my DLL from it's directory and when I brought up Labview it was searching for the DLL. So, I do know that it's looking in the correct location. I also tried renaming the DLL function and changing the "Call Library Function - Function Name" to reflect this new name. It still was unable to locate the function. Could this be something to do with unicode?

0 Kudos
Message 3 of 6
(2,871 Views)

I just wanted to add that this may be related to switching to Labview 2013. This Labview program hasn't been modified for 8 months.

0 Kudos
Message 4 of 6
(2,865 Views)
Solution
Accepted by topic author mperlick777

I've recreated the DLL and Labview Call Library Node and now it works.

0 Kudos
Message 5 of 6
(2,853 Views)

I'm glad you found your solution, and sorry I was unable to help more (was offline for a few days).

Batya

0 Kudos
Message 6 of 6
(2,827 Views)