Skip to content

[BUG] Using multiple eRPC clients/server in a C++ project lead to redefinition of struct binary_t #418

Open
@PhilippHaefele

Description

Describe the bug

We're using multiple eRPC files to generate different server / client connections in one project.
We're using the new namespace feature of 1.12.0 and assign each eRPC file it's own namespace.

As long as we do not have conflicting type names, we do not have any problems.
But as binary_t is implicitly generated for binary, we can't solve this issue by our self.

To Reproduce

Create two .erpc files with both containing a function that uses binary and a different @namespace(".....").
Then include both server (and or clients, so we get the "...common.hpp" file of both included) in on C++ file.

Expected behavior

The code generator, generates code without type conflicts / no compile errors

I think it should be easy by adding the namespace also to the ...._common.hpp file, while generating it via the code generator.

Desktop (please complete the following information)

  • OS: n.a.
  • eRPC Version: 1.12.0

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions