When building an Application (.EXE) from the host computer the Application will automatically link the LabVIEW Libraries required for the Application. If the Application is built for another computer to use, it is advised you create an Installer which includes the necessary files needed to run the Application.
When using the Always Included option in the Source Files when Building an Application, Selecting the main folder will NOT allow you to use the files within the folder as a Startup VI. This is because the files will ultimately be duplicated. To avoid this place the Startup VIs in the main folder and include the remaining folders, please see below:
When having some cross-linking references and adding these elements to the Always Included section, then you can face Error 7 at Open VI Reference for a Stand-Alone Application when trying to find files by path inside the executable. For example, in the previous example, let's assume that Demo 2.vi uses a VI from a Library that belongs to a second project. This library is called Library.lvlib and the VI used by Demo 2.vi is called Lib_VI_1.vi. This library was added to Folder 4 as shown below:
If Folder 2 is added to the Always Included section, then a new hierarchy level will be added inside the executable. The Application Builder will include all the required files inside a top-level folder, which name will be the same as the folder where your project is located. For example, if the Untitled Project 1.lvproj is located on ProjectFolder then the path to find Demo 1.vi inside the executable will be the following:
- ...MyApp.exe/ProjectFolder/Test/Folder 1/Demo 1.vi
If Folder 2 is not added to the Always Included section, then the path for Demo 1.v
- ...MyApp.exe/Test/Folder 1/Demo 1.vi
The file structure created inside the EXE is dependent on the file structure on the disk, not the virtual folder structure inside the LabVIEW project. If you want to make your first path to work, then you should have a disk file structure as the following: