NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL calling a subsidiary static library

Solved!
Go to solution

I've built a DLL using labwindows that calls a subsidiary static library. I've added a step in Test Stand that calls this DLL.  On my development station all is good.  The subsidiary library is called.  But, on a deployed station I keep getting a "Cannot load DLL".

 

According to the reference manual, I can preload the subsidiary librarys by using the CVI adapter.  I get the same error on my deployed station...

 

 

0 Kudos
Message 1 of 5
(3,848 Views)
Solution
Accepted by topic author JamesSid

You get an error "Could not load a DLL" when one of the dependencies is missing.

 

Please check it this way :

Download free dependency walker --- http://www.dependencywalker.com/

Select the DLL ( deployed machine).

It will show which dependency component is missing in the deployed machine.

 

For CVI..

Since you are using a static libarary - did you include it in the build when you build the project?

It should be embed within your DLL. ( using add files to DLL option in the CVI target settings).

 

Hope this helps.

 

0 Kudos
Message 2 of 5
(3,833 Views)

I tried the dependency walker.  A very nice tool.

 

After running dependency walker on my DLL, it threw an error that I was missing a DLL.  Turns out I had configured the target settings on one my static libraries as a DLL rather than a static library.  Changed the settings and rebuilt it.

 

Once I get access to that deployed bench again I'll check it out, but I'm pretty sure this fixed the issue.

 

Thanks for the information...

0 Kudos
Message 3 of 5
(3,825 Views)

Still get the same error.

 

I've added the static libraries in the target settings of the CVI project, including adding the libraries in the Test Stand adapter.

 

 

0 Kudos
Message 4 of 5
(3,819 Views)

After posting my last message, I realized my problem. 

 

I recently upgraded Labwindows to 2012, but my deployed station only has the 2010 rte.  so, I rebuilt using version 2010 and all is good now...

 

Thanks for the help and sorry for the confusion.....

0 Kudos
Message 5 of 5
(3,817 Views)