01-22-2014 03:45 PM
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)
{
Solved! Go to Solution.
01-23-2014 03:28 AM
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
01-23-2014 11:04 AM
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?
01-23-2014 11:28 AM
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.
01-23-2014 02:24 PM
I've recreated the DLL and Labview Call Library Node and now it works.
01-26-2014 01:07 AM
I'm glad you found your solution, and sorry I was unable to help more (was offline for a few days).
Batya