LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to include a .lvlib in a build that was created using a custom .dll

Solved!
Go to solution

I am trying to build an executable in LV2010 that uses a .lvlib that was created using a .dll from Keyence. I have added the .lvlib to the source files as "Always Included" and I have also added all of the .vi files of the library to "Always Included." I still get the error saying "Missing External Function" when running the program. The executable seems to open fine on the development computer but not on a secondary computer. Any ideas?

0 Kudos
Message 1 of 6
(3,736 Views)

Hi,

 

Just a few questions:

 

1. Do you have an error code for us?

2. Is your DLL in the support directory of your application?

3. Does your DLL has dependencies to other DLLs, which LabVIEW cannot resolve? We already encountered this "problem" with .NET assemblies, after putting them next to the referenced DLL everything works fine.

 

Hope this helps.

Tyler

Certified LabVIEW Architect
0 Kudos
Message 2 of 6
(3,718 Views)

What I ended up doing was changing a setting in the Call Library Funcion Node. There is a check box to specify path on the diagram. Using this feature I entered the path were the .dll would be located after it was installed and this resolved the problem.

0 Kudos
Message 3 of 6
(3,706 Views)

...I assumed too quickly that the problem was resolved. By specifying the path I was actually able to open the executable after installing but none of the .dll functions worked. I noticed that when I specified a path on the diagram, the .dll was no longer included in the dependencies and was no longer included in the build. I guess this would explain why none of the functions were working. I copied the .dll over to the path specified on the diagram and it still did not function.

This brings me back to the original problem I was facing. I actually removed the .lvlib. I replaced all of the library vi references with the Call Library Function and deselected the "Specify path on diagram" Boolean. When I do this, the build includes the .dll in the dependencies list and it includes the .dll file in the destination folder of the install. However, when running the executable I get a list of errors that read, "Missing external function …” I have attached an image of this error. This is the same error that occurred when I was using the library, but I thought maybe the library was the cause of the problem, which is why I used the Call Library Function instead.

*I have tried adding the .dll to the support files and I receive the same error when trying to run the executable.

*I have tried adding the .dll to the support files and making it an “always include” in the installer properties under source files. This returns the same error.

I’m really not sure where to go from here. Any help is greatly appreciated!

 

Download All
0 Kudos
Message 4 of 6
(3,683 Views)
Solution
Accepted by topic author harristt

Hi Harris,

 

I want to clarify a couple things.

 

- With all of these configurations you described above, the executable worked correctly on the development computer?

- Does the application work correctly on the development computer outside of a build specification, just running in LabVIEW?

- Have you tried deploying the executable to more than one computer, and do you see the same error on every computer other than the development computer?

- Is there any software that needs to be installed in order for the TMIF.dll to work? Is this software installed on the deployment computer?

 

It sounds like the DLL is successfully included, but for some reason the function comes up as missing. Also, I noticed the error message has a :C at the end of the message, which makes me wonder - is this a C DLL or a Windows (.NET) DLL?

Joey S.
Senior Product Manager, Software
National Instruments
0 Kudos
Message 5 of 6
(3,661 Views)

Joey, 

In your last question lies the answer. On the development computer I had installed the configuration software for the controller. On the second computer where I was running the executable I had not.

 

After installing the configuration software provided by Keyence on the second computer, the executable worked, the called functions worked properly, and this resolved the error.  

 

Thank you for your response,

Harris Taylor

 

0 Kudos
Message 6 of 6
(3,656 Views)