So currently I'm working on an open source tangle gateway in C++ called lotti which makes use of iota.c library to send encrypted and decrypted messages which works fine. As I want to add iota streams support, I also added the iota streams library with c bindings to my project. However, I get a conflicting type error of milestone_t which is defined in iota.c lib as well as the streams lib with different definitions. As both library headers are added via

extern "C" { 

they get resolved into the same namespace which make both libs incompatible. Therefore I would like to ask, if there is any other solution to combine both functionalities other than forking one lib and changing the name of thetypedef. Normally I try to not fork or change external repositories as it costs me a lot of time bumping them to newer releases and maintain changes. Is it perhaps not even intended to use both libraries? Or have I overlook that one library is capable of both (sending transactions/messages and handle iota streams). Your feedback will be much appreciated.

Regards emDave

2 Answers 2


Your intent is correct, both libraries should be compatible, or at least coexist peacefully. You are also not mistaken in assuming that neither of the libraries can do everything: iota.c is a Node client library, while streams is a client library for the streams/channels cryptographic protocol that runs on top of the Tangle. Streams uses iota.rs internally instead of iota.c to communicate with the nodes, that's why the incompatibility was unnoticed until now.

Thanks for reporting the issue. I have created a Github issue where you can track its resolution: https://github.com/iotaledger/streams/issues/154. Given the small scope of the changes necessary to workaround it, I suggest you to fork streams and subscribe to this Github issue to get an update when it gets resolved.

Besides that, I've also created a feature request to support iota.c as client, so that the libraries not only coexist but actually make use of one another: https://github.com/iotaledger/streams/issues/155. However, keep in mind that this one might take a bit more to get prioritised.

  • Hi Arnau, thank you for adding this to your issue board. I'll just fork it and keep an eye on the changes.
    – emDave
    Commented Oct 2, 2021 at 21:02

My best guess would be to merge both of the codes into one function with clear definition that they are two separately written item's and bots boom bots been it should allow you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.