recursiveRegisterEventSources is undefined

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
tommys
Sr. Member
Sr. Member
Posts: 15
Joined: 03 Oct 2023, 16:42

recursiveRegisterEventSources is undefined

Post by tommys »

Hi,
I just generated source code from our information model using UaModeler.

I added the newly generated C++ files to my CMake project and built it. It compiled fine but...
I got a linker error saying that member function recursiveRegisterEventSources is not being defined.
recursiveRegisterEventSources is declared in various NodeManagerXxxBase classes but it's not defined in any of the automatically generated C++ files.

Why is there no recursiveRegisterEventSources definition generated? How do I fix it?

tommys
Sr. Member
Sr. Member
Posts: 15
Joined: 03 Oct 2023, 16:42

Re: recursiveRegisterEventSources is undefined

Post by tommys »

I just realized that this problem was actually introduced in the code generated with the latest UaModeler v1.6.10! :-(
The generated code using UaModeler v1.6.9 does not have this problem.
Thank you

steve
Jr. Member
Jr. Member
Posts: 2
Joined: 25 Mar 2024, 06:32

Re: recursiveRegisterEventSources is undefined

Post by steve »

I had the same issue and fixed it by removing the model from the project and then adding it back in.

steve
Jr. Member
Jr. Member
Posts: 2
Joined: 25 Mar 2024, 06:32

Re: recursiveRegisterEventSources is undefined

Post by steve »

No I was mistaken. Deselecting the "Create instance component NodeIds in generate classes" option fixes the compilation error, but that is not an option for us. I have no viable solution yet.

tommys
Sr. Member
Sr. Member
Posts: 15
Joined: 03 Oct 2023, 16:42

Re: recursiveRegisterEventSources is undefined

Post by tommys »

Steve, I solved it manually by creating the missing definitions of recursiveRegisterEventSources methods. I don't remember if I copied code generated by the old UaModeler version or from code originated from another nodeset (the implementation of recursiveRegisterEventSources is the same for the different nodesets).
/Tommy

Post Reply