dcoons Posted November 9, 2018 Report Share Posted November 9, 2018 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). 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! Quote Link to comment
candidus Posted November 11, 2018 Report Share Posted November 11, 2018 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? Quote Link to comment
dcoons Posted November 12, 2018 Author Report Share Posted November 12, 2018 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. Quote Link to comment
dcoons Posted November 12, 2018 Author Report Share Posted November 12, 2018 (edited) 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 November 12, 2018 by dcoons added detail Quote Link to comment
dcoons Posted December 20, 2018 Author Report Share Posted December 20, 2018 Apparently it's a bug...CAR #723751 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.