LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compilation problems

Hi all,
I'm currently trying to compile one of my vi's and this leads me to two
different questions:

1) I'm using Labview 6i and would like to have the runtime engine included
in the *.exe file, is it possible? How can I do it?
2) I have a reference to an external ascii file that works great in Labview,
but after compilation I'm not able to access
that file anymore. I get the error message 7, file not found and don't know
what to do about it. Any ideas?

Thanks for your help, regards. Gilles
0 Kudos
Message 1 of 5
(3,199 Views)

  1. In 6i, App Builder doesn't offer the option of including the runtime inside the EXE. However, you can copy the contents of your Program Files\National Instruments\shared\Labview Run-Time\6.0 directory into the folder where your EXE is. This layout is easy to compress in a zipfile and copy to your target PC, without worrying about installing the LabVIEW runtime separately.
  2. Are you using the "Current VI's Path" node to reference the ASCII file? Inside an EXE, this node returns "C:\Path\To\MyProgram.exe\My.vi," so you will have to call Strip Path twice inside a built application. The developers at OpenG have a wonderful free library containing (among other things) a VI that will automatically do the right number of S
    trip Path calls, depending on whether you're in the development environment or in a built EXE.

0 Kudos
Message 2 of 5
(3,199 Views)
1. The runtime engine is separate from the .exe and the way to include it with a distribution is to make an installer. By default, when you select the create an installer, the rte is included.
2. Paths in a built application are a little different than in a stand-alone VI. A VI is now part of an exe file. Where a path in the development mode to a VI might be c:\folder\example.vi, in a .exe it would be c:\folder\app.exe\example.vi. If you are determining the path to the external file relative to the VI's path, then that's the reason for your error message. What you'll have to do is an extra strip path function which will give you the path to the exe and if the external file is in some place relative to that, everything will work fine. To make a built app and
the development mode both work, you can code that checks and put the extra strip path inside a case statement. Using an application property node App.Kind will return either Full Development, Application Library, or Student Edition and is what I use to check the mode.
0 Kudos
Message 3 of 5
(3,199 Views)
How is that library called, so I can download it easely without spending
time looking for it. Thanks Gilles

unDees a écrit :

>

    >
  1. In 6i, App Builder doesn't offer the option of including the
    > runtime inside the EXE. However, you can copy the contents of your
    > Program Files\National Instruments\shared\Labview Run-Time\6.0
    > directory into the folder where your EXE is. This layout is easy to
    > compress in a zipfile and copy to your target PC, without worrying
    > about installing the LabVIEW runtime separately.
    >
  2. Are you using the "Current VI's Path" node to reference the ASCII
    > file? Inside an EXE, this node returns
    > "C:\Path\To\MyProgram.exe\My.vi," so you will have to call Strip Path
    > twice inside a built application. The developers
    at
    > href="http://www.openg.org">OpenG
    have a wonderful free library
    > containing (among other things) a VI that will automatically do the
    > right number of Strip Path calls, depending on whether you're in the
    > development environment or in a built EXE.
    >

0 Kudos
Message 4 of 5
(3,199 Views)
The library is called the OpenG Toolkit. You can download the entire toolkit, or just the file component, which adds a VI called "Current VIs Parent Directory" to the File I/O >> File Constants palette. I recommend getting the entire toolkit--there are many good tools there.
0 Kudos
Message 5 of 5
(3,199 Views)