07-10-2026 08:10 AM - edited 07-10-2026 08:11 AM
Architecture of my project includes dynamic loading of classes with Get LabVIEW Class Default.vi. It works fine under LabVIEW IDE. When compiled in EXE problems appear.
Get LabVIEW Class Default.vi cannot find the class specified in the class path unless the class was already loaded. The problem appears in parts of the code that are not new. They were already debugged and worked properly in EXE. Irrelevant parts of code were added; EXE was recompiled and the problem popped up.
I cannot upload the project here and I cannot reproduce the problem on a small scale.
The attached project doesn’t suffer from the same problem despite the solution is basically the same.
If the real project runs as EXE, the first frame generates error 7, the second and third frames work error-free.
Please suggest what could go wrong and how the problem can be nailed.
LabVIEW 2021 32-bit.
07-10-2026 11:14 AM
I believe the only reliable way to use a dynamic load/plugin architecture is to use PPLs. Create and build a parent PPL containing the parent class as Parent.lvlibp:Parent.lvclass, then create a child class inheriting from the parent in Parent.lvlibp (not the Parent.lvclass before it's built into a PPL). Then put that child class into Child.lvlibp:Child.lvclass as another build, and load that to get the dynamic class load feature working.
I do not do this myself, but one of my co-workers does and it works for him. I can't speak to a lot of details here because of that.
07-10-2026 11:29 AM
It seems like it should be working, I can't tell from your example where the problem is. But I have to ask why you're even bothering loading these things dynamically within an exe, rather than just statically linking?
07-10-2026 12:20 PM
The dynamic loading is likely the cause of the issue. If the builder does not see a hard dependency, it will not be included in the executable. By calling the class by path, the builder does not see the child as a hard dependency and therefore will not include it in the build. You can add the class to the "Always Include" in the build specification.
Personally, I go the PPL route Kyle was referring to. This makes the build for the executable a lot simpler/faster. If I find a bug in the child class, I only need to rebuild that PPL and my executable is still happy. If there is a bug in the executable, only the executable needs built, not the libraries it is using. It does take some care to keep the PPL build order and destinations correct. And then the deployment needs to keep relative paths between the PPLs. But after a few attempts, it becomes almost second nature. I also use the LabVIEW Solution Builder to build my PPLs.