It all depends on your integration point and use case. The extra interopability work has to pay for itself. One possible trick is to use a message passing architecture and pass json/protobuf messages between the code bases.
Some companies also use lots of ffi code generation tools.