03-16-2021 10:26 AM
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.
Solved! Go to Solution.
03-16-2021 02:57 PM - edited 03-16-2021 03:02 PM
I threw together a quick demo project. (LV2020sp1)
03-16-2021 06:01 PM - edited 03-16-2021 06:02 PM
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.
03-16-2021 07:14 PM
Thank you. That's the explanation I was looking for and couldn't find for the life of me, by googling.