08-08-2018 06:43 AM
When I create an exe from my LabVIEW project the exe may not work properly. Then, when I create the exe again, without changing anything to the project, the exe does work. In both cases the main vi starts running but the behavior is different. First I noticed that in both cases the size of the exe file is different ( so after a build I can tell from the file size of the exe if it will work or not).
Then I figured out that, in case it does not work, the exe cannot find a vi that is called dynamically from the main vi. This vi should be inside the exe but for some reason it isn’t in there or it cannot find it.
So how is it possible to have different executables from exactly the same project and what could be the reason that a vi is not inside the exe that should be in there (or at a wrong location)? My work around is keep building the exe until I have one that works but this issue bothers me a bit.
I am using LabVIEW 2010.
08-08-2018 08:15 AM
08-10-2018 07:05 AM
Update. The following is the problem. In the build script under Source File Settings some vi’s are marked with “Apply prefix to all contained items”. I found out that after the build these vi's are stored inside the exe with their original names, so without the prefix. When the application needs to load a vi dynamically it tries to load <prefix><viname>.vi. Since this vi does not exist in the exe this vi cannot be loaded.
Now is the question why the builder (sometimes) refuses to add the prefix.