LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating labview stand-alone executable issues

Solved!
Go to solution

Hello,

 

I have an issue creating an executable with my labview project and I just can't seem to get it to work. The layout of the project looks like this.

 

TestAutomation Project Layout.PNG

 

but when I build the executable from the Application Builder, it does run the LabVIEW VI. However, it doesn't use the features (from what I can tell) of the dll or ChrApi.lvlib, because it doesn't activate the tests that these libraries are responsible for...any advice would be appreciated.

0 Kudos
Message 1 of 8
(4,716 Views)

If these are third-party routines, particularly if they aren't directly called by your code, they might be missed by the App Builder.  The usual way to force them to be included is to put them in the Always Included section.  My builds generally have only the top-level VI in the top box, and the occasional "foreign" .dll in the lower box.

 

Bob Schor

Message 2 of 8
(4,713 Views)

Make sure you have your LabVIEW Runtime engine installed on your target machine..

0 Kudos
Message 3 of 8
(4,678 Views)

@Matt-A. wrote:

Make sure you have your LabVIEW Runtime engine installed on your target machine..


The OP stated that he can run his executable. Without LV RTE it would not even be possible. The problem is with the dll as he said.

0 Kudos
Message 4 of 8
(4,647 Views)
Please check the following note and see if it can help: If you plan to distribute a stand-alone application that uses shared variables, do not include the .lvlib file in an LLB or in the executable. Change the Destination of the .lvlib file to a destination outside the executable or LLB.
Source: https://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/building_a_stand_alone_app/

Thanks
uday
Message 5 of 8
(4,636 Views)

When you say change the destination of the .lvlib file does that mean you simply change the directory of where the .exe file is being generated and where the current .lvlib file is located?

 

Right now my .lvlib file is in the user.lib folder of labVIEW 2015 on C: drive whereas I generated my stand-alone executable on some folder in desktop.

 

Thank you very much, your help is really appreciated!

0 Kudos
Message 6 of 8
(4,587 Views)

Can you post a screen shot of your Build Source page?  I would expect the top box to have a single entry, your Top Level VI (I can't figure out which one that is -- possibly Final ToO?), and the bottom should have your ChrApi.dll in user.lib.

 

If you've built such an Executable, what happens when you try to run it?

 

If it does not work, try also adding ChrApi.lvlib in the Always Include window.

 

Can you tell us more about this library?  Whose Library is it?  [Maybe we can go to their Web Site and figure out if there are some "tricks" they tell you about building Executables].

 

Bob Schor

0 Kudos
Message 7 of 8
(4,576 Views)
Solution
Accepted by topic author ibzrehmani

Check the DLL calls in the VIs.  If the "Library name or path" contains a path, the app builder will copy the DLL to the build destination, and the executable will load that copy.  If "Library name or path" contains only a name, and not a path, then the DLL won't be copied by the app builder, and when the executable runs, it will ask the OS to find the DLL.

"If you weren't supposed to push it, it wouldn't be a button."
Message 8 of 8
(4,557 Views)