Jump to content

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

Link to comment

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
Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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