11-17-2024 03:10 PM
Hi all,
I'm running into a really irritating issue trying to build a set of PPLs. One PPL (call it PPL A) uses some code that depends on a dll. I can see where it depends on it and it is a genuine dependency. However, I want to build the PPL without including that dependent shared library because if I dont exclude it, other code that uses PPL A and fails to build because it has a dependency in the build directory... (i.e. it tries to copy the dependent dll from where PPL A's build put it, back to the same place and fails).
BUT, no matter what I try, the build specification seems to be totally ignoring the "Exclude dependent shared libraries" check box. Are their particular situations where LabVIEW can't exclude a dll from a PPL build? This is driving me mad! For info, this is in LabVIEW 2021 SP1.
Cheers
Paul
11-18-2024 08:46 AM
Hey Paul, my understanding of the 'exclude dependent shared libraries' feature is that the DLL should never be copied, so this seems like a bug. Is there any chance you could share code with me that reproduces the issue?
11-18-2024 09:09 AM
Hi Darren,
Thanks for the reply.
I can probably share this with you as is yes, but I will have a quick look and see if I can reproduce it with the same dll outside of that specific project quickly first. What's the best mechanism for sharing it with you when I have something shareable?
Cheers
Paul
11-18-2024 09:16 AM
You can send me a zipped up project through a DM on the forums, or you can email it to me, either way.
11-18-2024 02:03 PM
I always thought the "Exclude dependent shared libraries" check box meant "exclude files in *.lvlib libraries" not "exclude DLL files".
Have you considered doing either of:
1. Add a "post-build" action VI that deletes the DLL in this folder after building
2. Move your file/folder structure around. When loading your .lvproj file, any directory in the same directory as it, or anything nested under it, will be scanned and found. So instead of having your project in "C:\AppName\source\project.lvproj" and building to "C:\AppName\source\builds", move your lvproj file to "C:\AppName\source\Project file\project.lvproj", or any other reorganization.
11-19-2024 02:50 AM
Hi Kyle,
Thanks for the response.
It's definitely for excluding dlls although I cant quickly find the documentation reference that says that.
the issue arises when building a hierarchy of PPLs. If a low level PPL has a dependency to a dll and you dont exlcude that dll in the build, the dll gets copied to a location next to the ppl (or the support directory of the ppl build spec). Then when code for a higher level ppl has a dependency on a lower ppl, it inherits the dependency on the dll in the new location. Then when you go to build the higher one, even if you exclude the dependent PPLs from the build it will still try to include the dll, but source and destination are then likely the same.
Also, if the higher level code uses the dll directly, it now pulls it from next to the source PPLs built location instead of where it should be (e.g. by installation of a toolkit that includes a dll)... and that can cause issues too. I have played in the past with a post build action to automatically delete the unwanted dll, but it's not a very satisfactory solution, particularly in a large hierarchy of ppls as you have to include that post build delete in the build of every PPL that depends on the PPL with the dll dependency. "Exclude dependent shared libraries" is supposed to remove the need for that.
I'm not entirely sure I understand the purpose of reorganising my file and structure in relation to this issue though...
Cheers!
Paul
Cheers
12-03-2024 01:18 PM
FYI to anyone reading this thread, I was able to reproduce the issue in LabVIEW 2021 SP1, but it appears to be fixed in LabVIEW 2022 Q3 and later.