This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Error -6 When Building a LabVIEW Executable

Updated Dec 18, 2023

Reported In

Software

  • LabVIEW Real-Time Module
  • LabVIEW Application Builder Module
  • LabVIEW

Operating System

  • Windows

Issue Details

I am utilizing the LabVIEW Application Builder to create a distribution (i.e. an application (EXE), a shared library (DLL), source distribution (LLB), or web service). When I create the distribution or run the application, I receive an error similar to one of the following:

Error 6 occurred at AB_Source_VI.lvclass
Possible reason(s): LabVIEW: Generic File I/O error.


What causes this error and how can I resolve it?

Solution

Error 6 occurs when building a distribution when the file path of a file in the project extends beyond the 255-character limit allowed by Windows. To resolve the error, follow the steps outlined below:
  • Use a shorter path, like C:\Your_File
  • Ensure that your file path is not pointing to an incorrect drive, such as a CD or DVD drive. 
  • For an application or shared library builds, place a checkmark in the Use LabVIEW 8.x file layout checkbox on the Advanced page of the build specification Properties dialog box.
 
 
  • For a source distribution or web service builds, uncheck the Preserve disk hierarchy checkbox on the problem on the Destinations build specification page located under the Destination type.
 
  •  If you are building your project in a shared drive, check your network connection. Try to switch from wireless to wired connection, or build the application in the local hard drive of your computer to isolate the issue. 
 

Additional Information

For more information on the Maximum Path Length in the Windows OS, visit the MSDN article on File Names, Paths, and Namespaces. This article explains also how you can enable Long Paths in Windows 10 Build 1607 and later, to avoid the MAX_PATH limitations in Windows.