12-02-2005 04:44 PM
I have a project for which I am trying to produce a functional executable. The project makes use of several dynamically called VIs that, when called, run independently of the top-level VI that invokes them.
All of this works well prior to trying to turn it into an executable.
In the case of the executable however, one of these dynamically-loaded VIs, opens with a broken run arrow. Clicking on the broken arrow reveals that there are one or more instances of six “missing subVIs”.
I have tried setting the build target to be both an EXE & LLB or just a big EXE (same result when tested) and when I look in the LLB (or the stand-alone EXE after renaming it as an LLB) I can see all six subVI files there.
I have tried telling the app builder to include the six subVIs as dynamically-loaded VIs – that didn’t help either.
One thing all six subVIs have in common is that each contains at least one call to one of several custom DLL library routines. The DLL files are included in the build as support files and show up in the DATA folder produced by the build.
I have taken the .BLD file and have removed the desired VI as the top-level VI and promoted the problem dynamically-called VI to the top-level VI and built it as an EXE (no other changes) and when I try to run that, it works just fine. I have then taken that exact same .BLD file, demoted the top-level VI back to a dynamically-called VI and re-specified the desired VI as the top-level VI and rebuilt the application and once again the dynamically-called VI opens up broken when it is called.
This is under LabVIEW 7.1.1 and WinXP SP2.
Is there a fix for this?
12-07-2005 04:45 PM
Just a followup...
I have found three ways to fix this. This is what I found (in the order that I found it):
FWIW, all the testing referred to here was done on the same machine where the executables were built. After I had a working executable I was able to move it to a different machine which only had the run-time engine and it ran properly there too.
12-07-2005 05:06 PM
have you tried checking to see if the path to the dynamic vi's are correct, The path will not be the same to them when built as an executable.
Dev Path c:\viname
Build Path c:\data\viname
when you do the build allow debugging so that you can check to make sure that the paths are correct.
12-07-2005 05:18 PM
The path to the Dynamic VIs wasn't an issue.
The invoking routine is setup to find them whether they are in a folder or LLB file or EXE file.
As was stated in my original post, one of the dynamic VIs would open, it just would not run and it reported that some of its subVIs were missing.
10-23-2013 07:53 AM
Hi,
I have a similar problem.
I need to make an exe file from a main vi which uses three different dll files. the dll files were originally written in C++ and i converted them to Labview vis. these vis have been then used in the main vi.
To make the exe file, I tried adding everything to the always including tab of source files. but after building the exe file, they are not added in the directory and there is error that it cannot find all of the vis from the dll libraries.
Do you have any clue on how to fix this?
Thanks!
10-23-2013 07:55 AM
Put one indicator and verify what is the path when you run the application(exe). How you are building the path in exe file?
10-23-2013 08:19 AM
I dont know what you mean by putting an indicator?
How I make the exe file:
I have a project where my main vi is included plus the dll files and all the vis that are created when converting the C++ codes in the dll library. then I go to build specifications and add my main vi as the "startup vi" in the "source file category" at the left of the window and add the other dependant vis and libraries to the "always included" window in the the same page. and then press build.
When I press generate preview i also dont see the dependant vis?
10-23-2013 10:29 AM
Are you dynamically calling the VIs (meaning by file location) or are you calling them directly? If calling them directly, then the VIs are in the EXE. What is likely missing is your DLLs.
10-24-2013 04:36 AM
Yes, the vis are in my exe file. as when i generate the preview only dlls are added to the data. I attached the preview page.
I also attached the error i get when running the exe file. it is possible that the dlls are somehow missing or it cannot correlate the vis (derived from the dll library) with the dll.
Do you know how I can properly add the dlls and its corresponding vis to the exe file?
Thanks
10-24-2013 07:40 AM
Actually, i have to make it clear that I am not dynamically loading my vis.