10-29-2020 06:43 AM - edited 10-29-2020 07:01 AM
Hello everyone,
I have experienced the following weird behaviour with LV2020:
If you have a class and an interface (the two are not related in any way) in the same lvlib and your application is using the class then the build fails with this message: LabVIEW: (Hex 0x696) You cannot inherit an interface from a class. Interfaces inherit only from other interfaces.
Solved! Go to Solution.
10-29-2020 07:09 AM - edited 10-29-2020 07:09 AM
Update:
This error is related to the "Remove unused members of project libraries" option in the build spec:
If turned off then the app builds just fine and it is the same if all included classes & interfaces are used in the application.
09-26-2021 02:45 AM - edited 09-26-2021 03:28 AM
@ImreSzebelledi 已写:
Update:
This error is related to the "Remove unused members of project libraries" option in the build spec:
If turned off then the app builds just fine and it is the same if all included classes & interfaces are used in the application.
This behavior should be reported as a bug to NI. Uncheck "Remove unused memebers of project libraries" would cause some side effects when you're building a "real" application which is more complicated that this narrow-downed version. It should be fixed.
And a workaround is to build the .lvlib to a Packed Library(.lvlibp) first then direct call VI's from the packed library rather than the lvlib.
09-26-2021 09:08 AM
I have just checked with Labview 2020 SP1 and the bug seems to be fixed in that. The example builds just fine.
-Imre