-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference in inheritance.h in debug mode #735
Comments
From the error message it seems like you're missing a dependency on |
@ara-ayvazyan But it's working in release mode. I don't see any dependency difference between debug and release. |
It looks like the generated _grpc.h header may be missing a Potential work around: add this before your include of the relevant generated _grpc.h headers:
After including this header your executable will have a dependency on libbond.a/bond.lib. That's where the metadata for types like As for why it works in release but not in debug, that could be due to the optimizer determining that some section of code/template doesn't actually get executed/expanded and skipping it. There's one |
When a service contains events or parameterless methods, the generated code uses bond::Void as the request/result type. To serialize bond::Void, bond_reflection.h needs to be included. The generated service code now includes bond_reflection.h if any service contains an event or a parameterless method. Fixes microsoft#735
When a service contains events or parameterless methods, the generated code uses bond::Void as the request/result type. To serialize bond::Void, bond_reflection.h needs to be included. The generated service code now includes bond_reflection.h if any service contains an event or a parameterless method. Fixes microsoft#735
Can you try my proposed improvement? It's in the branch chwarr/grpc-include-reflection of my fork of Bond: https://github.com/chwarr/bond.git:
|
@chwarr Your PR fixes the issue. Thanks. |
Really, it fixes the issue completely? Hrm... I was just expecting a more informative compiler error. Can you share the linker command line that was invoked when you built with my proposed fix? (I'm trying to see whether or not libbond.a was linked in. If it was linked in, that's what I expect is the real fix. If it wasn't linked in and this still fixed it, something else is going on that I want to dig into.) |
When a service contains events or parameter-less methods, the generated code uses `bond::Void` as the request/result type. To serialize `bond::Void`, bond_reflection.h needs to be included. The generated service code now includes bond_reflection.h if any service contains an event or a parameter-less method. Fixes #735
Learning from the example, my code looks like:
When my project is compiled in Debug mode:
I will get error messages when
make
:Switching between Clang3.8 and GNU5.4 will not help. But everything is working fine in Release mode:
Am I missing something?
The text was updated successfully, but these errors were encountered: