Jump to content
News about the LabVIEW Wiki! Read more... ×
Sign in to follow this  
dcoons

Shared library PPL dependency problems

Recommended Posts

Inspired by my question from this post: link, I started off on a path of packaging project dependencies into vi.lib as suggested by @smithd and @Darren  however I have started down a rabbit hole of packed project library (ppl, *.lvlibp) head scratchers that have left me a little confused on what is going on in the background. Most of my components are built into packed libraries because I am following plugin models for extensibility when building as an EXE.  To make packed libraries work with dependencies, you basically have to build those into packed libraries as well to avoid the namespace issues.

I used VIPM to create packages to distribute some of this shared code to vi.lib.  In the example below, I created a packed library (Controls.lvlibp) and packaged it to vi.lib for use.  In the Limits project in the image, I am using the Controls library in a few of the functions. Limits also contains a build specification to create a packed library for a component.  However, I first noticed an issue when I looked at my child class projects (that inherit from the Limits.lvlibp:Limits.lvclass).

image.png.bf047ca37290771fcd30a2f057978145.png

The Limits.lvlibp is showing as Not Loaded. When I go directly to the library on disk and try to open it, I get the message "Project or Library file cannot be opened." I notice that if I get the correct Controls.lvlibp into memory by opening it up or by putting one of its VIs on a block diagram, then the library will load correctly.  So, I know it has something to do with when data from vi.lib is loaded into memory, but I don't know how to force it into memory to get this to work correctly.  Generally I am selecting the option to "Exclude dependent packed libraries" in my build specifications, but if I leave that unchecked it will open properly (because it places the dependency directly next to where it is built).  I did not have these issues until I placed my shared components into vi.lib, so I would be grateful for any help to help me debug this!

image.png.7d268e2fbbb3335d91ff8a82cb602a17.png

Share this post


Link to post
Share on other sites

All required libraries should be able to coexist peacefully. What happens if you add Controls.lvlibp to Limits (TSC_XML).lvproj? Does it help or does it make things worse?

Share this post


Link to post
Share on other sites

The Limits.lvlibp stays Not Loaded even when Controls.lvlibp is added to the project.  It doesn't make anything worse, just doesn't change anything.

Share this post


Link to post
Share on other sites

As an update, here is an example code project demonstrating to a minimal degree what I am trying to accomplish.  In this case the VIPM package will go to user.lib, but the same issue still applies.  (Also, I made a .vip file, but you can just take the built packed library and put it into user.lib instead of using the package and it will still demonstrate the issues)

-Common Code has a reuse function I want to use and it is built into a packed library

-Parent defines a parent class that uses a function from common code and is built into a packed library

-Child class inherits from Parent but Parent is Not Loaded and breaks Child class

vi.lib reuse issue.zip

Edited by dcoons
added detail

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.