LabVIEW Executable Cannot Find DLL

Updated Mar 11, 2019

Reported In

Software

  • LabVIEW Application Builder Module

Issue Details

  • I have created a LabVIEW executable that works well in my development computer, but produces an error on the deployment computer because a DLL cannot be found. How do I add this library to the executable?
  • I have included a DLL as a dependency in my build, but my deployed executable still cannot find the DLL. I can see that the DLL is being installed on the deployment machine, but it is not being loaded properly.

Solution

  1. Make sure your DLL is being included in the executable's build. If your code is making a dynamic call to the DLL, then you will need to manage the project's dependencies by adding the DLL to the project manually.
  2. Use a relative path to call the DLL. Include the DLL at a location that can be addressed relative to a known location, such as the directory of the deployed executable. You can then build a relative path in LabVIEW and this path will be valid on the deployment machine as long as the DLL is being installed in the same relative location.​​​​​​

Additional Information

  • DLL linking to project builds can be difficult to debug. This article addresses issues stemming from incorrectly sourcing the DLL in LabVIEW code. However, there are many other possible DLL-related issues. See the Related Links section of this article if you have tried the steps here and are still experiencing a DLL-related error.
  • Dynamically-called DLLs are not immediately added as dependencies to a build specifications for the project that includes the dynamic call. They must be added manually.
  • Absolute paths are problematic when moving code between machines since they are often too specific to the development machine. The path to the file must be the same on both machines for absolute paths to work effectively. Since this is nearly impossible in most applications, relative paths are recommended.

WAS THIS ARTICLE HELPFUL?

Not Helpful