So for example, I have a slightly complicated case of library dependency in one of my projects:
/--------------------------------\
| |
/----> GRPC <------------------\ |
| | |
| (c++) | |
\------- A --------------> B |
| (rust) |
| |
\------------------> c++ <---/
(A is a binary, B is a lib)
Possible solutions:
- Set B as a shared library: it works. But B itself contains a complete definition of GRPC, there are potential violation of ODR.
- Set B as a static library: Again B itself contains a complete definition of GRPC, so there will be multiple definitions.
- Use B as GRPC provider: So I need to maintain GRPC together with B. It is not practical.
(Actually,my current solution is 1, but A even depends on a static libc++ [maybe I should change that], so I think there is a serious ODR violation)
I wonder if anyone is also facing this situation. And any better idea?