Yet another (LabVIEW) blog

Cannot open a packed library saved in a version earlier than the current version of LabVIEW

If you have LabVIEW application, which uses PPL and works fine in development environment, but does not work as executable – this is the right place to search for the solution. But first, let’s discuss background of the error.

Project packed library (PPL) – is great stuff in LabVIEW, but for a long time it had one major disadvantage. As it is compiled LabVIEW code, it was possible to use PPL just in the same version of LabVIEW as it was built. If one would like to use it in higher/lower LabVIEW version – then PPL had to be rebuilt.

Not so much time ago NI has finally implemented solution for it. Starting from LabVIEW 2017 it is possible to compile a packed project library to be also used with newer versions of LabVIEW. To do so, one has to enable checkbox “Allow future versions of LabVIEW to load this packed library” in the PPL build specification.

Similar approach was used for executables. LabVIEW executable could be run just with the same version of Run-Time engine, as it was built. But starting from LabVIEW 2017, it is possible to build executables which could be run in newer Run-Time engines. To do so, executable build specification has option “Allow future versions of the LabVIEW Runtime to run this application”.

Be aware – when executable is built using this option enabled, then it is executed using the highest Run-Time engine version, installed on the machine. And that could cause the error while loading of PPLs, which are built without “Allow future versions of LabVIEW to load this packed library” flag.

Imagine the following situation. Let’s say, that we use LabVIEW 2017. There is PPL, which is built without “Allow future versions of LabVIEW to load this packed library” option enabled. There is LabVIEW application, which uses this PPL. In development environment everything works smoothly.

When application is built as executable, and option “Allow future versions of the LabVIEW Runtime to run this application” is disabled, executable still works perfectly.

But as soon as executable is built with “Allow future versions of the LabVIEW Runtime to run this application” option enabled, and there is higher Run-Time engine installed – then it can not load PPL, because it is built in lower LabVIEW version.

So, there are 2 ways of how to solve the situation.

  1. Rebuild PPL and enable “Allow future versions of LabVIEW to load this packed library” option. Obviously, it will help just when source code of the library is available, and when LabVIEW version is >= 2017.
  2. Rebuild executable and disable option “Allow future versions of the LabVIEW Runtime to run this application” (by the way, this option is enabled by default). I believe that this could be more common use case, as it is often happens that there are some PPLs built some time ago, and we reuse them across different applications, without need to rebuild them.

Leave a comment

Your email address will not be published. Required fields are marked *