LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using "Always Include" in Build for Classes in Virtual Folder

Solved!
Go to solution

I have an app that uses dynamic dispatch to load child classes. All works great in source. When I build, I place the virtual folder that contains all the child classes in the "Always Include" section. Those classes don't seem to make it into the build. I've tried specifically adding one of them, but the same thing occurs. The only way I've found to get a successful build is to place constants of the classes I need on a VI that will get automatically included in the call chain from the startup VI. That seems crazy.

 

Why doesn't "always include" actually work? I can see these classes being opened in the builder log. They just don't seem to get compiled and saved where they should be.

0 Kudos
Message 1 of 4
(968 Views)

I threw together a quick demo project. (LV2020sp1)

0 Kudos
Message 2 of 4
(900 Views)
Solution
Accepted by topic author thutch79

Just because the class is included in the executable does not mean it is memory when the application starts up.  You need to load the class by the path of the class.  Luckily, the relative paths stay the same between VIs and classes when you build the executable.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 4
(882 Views)

Thank you. That's the explanation I was looking for and couldn't find for the life of me, by googling.

0 Kudos
Message 4 of 4
(876 Views)