01-19-2009 06:19 AM
Hello everybody,
I'm using LabWindows 8.5 and I created a DLL in LabView 8.2.
As I have seen in the knowledge database, the way to initialize arrays and cluster structs for this DLL is using the following:
TD1Hdl Xt;
Xt = (TD1Hdl)DSNewHandle(sizeof(TD1));
(*Xt)->dimSize=N;
DSSetHandleSize(Xt, sizeof(long)+N*sizeof(double));
Where
typedef struct {
long dimSize;
double elt[1];
} TD1;
typedef TD1 **TD1Hdl;
I have already added extcode.h to my project, by I receive this project linking errors:
Undefined symbol '_DSNewHandle" referenced in "SAnalyzer.c"
Undefined symbol '_DSSetHandleSize" referenced in "SAnalyzer.c"
I have seen some examples in ni.com where this functions are supossed to work just adding extcode.h (in LabView \ cintools). I also tried the extcode.h generated in the DLL build, but get the same problem.
Maybe this functions are only working in code files related to the DLL created folder, but no in my main program?
01-19-2009 08:11 AM
You also need to include the import library labview.lib from the LabVIEW cintools directory in your project so that CVI knows in which dll to find those functions.
Michael
NI
01-19-2009 09:10 AM
Thank you for your reply Michael.
I've already tried this, but I get this error while the program is running:
As I see in http://digital.ni.com/public.nsf/allkb/A4C3AEF93240280A86256931006FB66C this happens when using DLLs created with older versions of LabView than the one you are using. I have installed some features of LabView 8.5 over LabView 8.2 without installing the whole LabView 8.5, so I think installing the new version will fix it.
Thank you!
Eduardo Tamargo
Spain
01-20-2009 02:19 AM
I've installed LabView 8.5 but the problem continues. I've tried with labview.lib and .h files of LV 8.2 and the one of LV 8.5. I also tried to generate again the DLL but LV 8.5 can't find the .vi files (related with the advanced signal processing toolkit).
Any suggestions?
01-21-2009 03:16 AM
I uninstalled the software and installed again. Right now I'm using the complete version of LabWindows 8.0.1 + LabView 8.2.
If I create a blank CVI project, and add labview.dll and use those functions (DSNewHandle, DSSetHandleSize), I continue having the same runtime error.
I hope there will be an easy solution...
Eduardo Tamargo
Spain
02-04-2011 03:00 PM
Hi!
Is this problem solved? And if solved, how is it solved?
I've the same problem,.... in Visual C++ 2008: LNK2019 ... "_DSNewHandle"
Greets
02-07-2011 03:06 AM
I don't remember well, but at the end, the problem was about LabView/LabWindows versions and different versions installed over the time. I think that was resolved by uninstalling all NI products, doing a thorough cleaning, andinstalling the latest full versions only from the original discs.