Solution
This is usually caused by an underlying issue in the code that prevents a successful compile.
Ensure all subVIs are runnable and correctly linked to the main VI. The mass compile functionality in LabVIEW, see related links, can be used to do this automatically. Investigate any bad or corrupted VIs named in the mass compile report by opening them in the LabVIEW version you are compiling for and ensure there are no errors.
Compiliers can remove subVIs or libraries that are dynamically called from the build, assuming they are unused. If your application dynamically calls any subVIs or libraries build these into a Packed Project Library and mark them to be always included in the LabVIEW application build.