LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

project link error extcode.h

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?

0 Kudos
Message 1 of 7
(6,578 Views)

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

Message 2 of 7
(6,571 Views)

Thank you for your reply Michael.

 

I've already tried this, but I get this error while the program is running:

error 

 

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

0 Kudos
Message 3 of 7
(6,563 Views)

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?

0 Kudos
Message 4 of 7
(6,535 Views)

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

0 Kudos
Message 5 of 7
(6,496 Views)

Hi!

 

Is this problem solved? And if solved, how is it solved?

I've the same problem,.... in Visual C++ 2008: LNK2019 ...  "_DSNewHandle"

 

Greets

0 Kudos
Message 6 of 7
(5,501 Views)

I don't remember well, but at the end, the problem was about LabView/LabWindows versions and different versions installed over the timeI think that was resolved by uninstalling all NI products, doing a thorough cleaning, andinstalling the latest full versions only from the original discs.

0 Kudos
Message 7 of 7
(5,470 Views)