facebook / fbthrift

Facebook's branch of Apache Thrift, including a new C++ server.
Apache License 2.0
2.57k stars 608 forks source link

CPP: Reference enum from another generated header #532

Closed klausneda closed 1 year ago

klausneda commented 1 year ago

Hello.

I have a thrift project that defines EnumOne in a thrift file that is used to generate files finally used to create libOne. From another thrift project I need to reference in my thrift files EnumOne, generate a new set of files and generate libTwo.

Is there a way to do this? I am looking at cpp_include and cpp.type but I wasn't able to reference in a thrift file a enum type coming from an existing CPP header.

iahs commented 1 year ago

You would include the .thrift file that defines EnumOne in order to reference that enum in a different .thrift file