LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

LabVIEW exe cannot find VI's in lvlibp

Solved!
Go to solution

I have a LabVIEW project that uses VIs and classes within an lvlibp packed library developed by another company but we own the source. I have been able to run my code in the development environment successfully. However, when I build an executable, the executable pops up a message and file browser saying it cannot find a vi in the lvlibp file. I have saved and recompiled the lvlibp and copied over to my project then saved my project and built it against the lvlibp. But when I run, the same thing happens. I placed the lvlibp in the same folder as the executable. I have also copied the whole data folder into the directory but it still does not work. If I use the file browser that pops up and click on the lvlibp it still fails and pops up a window that says "LabVIEW: file not found. The file might be in different location or deleted. Use the command prompt or the file explorer to verify the path is correct. The file '' could not be loaded. Select Another?". In the build spec for my exe project I have listed my lvlibp file. What am I missing?

 

 

0 Kudos
Message 1 of 5
(1,106 Views)

Once the lvlibp is compiled into the EXE, are you certain that you are using the correct path to locate the files within the EXE/lvlibp? Are you using the application directory constant as the base path and building a relative path from there?

aputman
LabVIEW 2017
LabVIEW Programming
0 Kudos
Message 2 of 5
(1,075 Views)

I must not be since I have no idea what you are talking about. Smiley Wink Can you please explain how I set those paths? Is that in the properties of the project or VIs?

0 Kudos
Message 3 of 5
(1,035 Views)
Solution
Accepted by topic author Steve_Steiner
08-16-2017 08:09 AM

It seems like the most frequent issue on the forums is exactly this post, that "my code works in the dev environment but when compiled into an EXE, such and such file cannot be found."  When you are running this project in the development environment, all of the VIs in the project are loaded into memory and can easily be found.  However, when running as a compiled EXE, the runtime is a bit more picky about where files are located.

 

You said you tried placing the lvlibp file in the same directory as the EXE.  I don't know what your build specifications are but what happens if you create a "data" folder in the same directory as the EXE and put the lvlibp in that directory?  

 

If you look at the build specs under the Destinations category, the Support directory path is one location where the runtime will look for these additional project inclusions. 

aputman
LabVIEW 2017
LabVIEW Programming
Message 4 of 5
(1,026 Views)
Highlighted

Thank you! You gave me the clue I needed. It turned out the executable was not being run from where I thought it was so, i was copying my support files to the wrong location. Your response made me realize I was not looking for a special setting but that location is the issue. Thank you again.

0 Kudos
Message 5 of 5
(1,011 Views)