Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.1
-
None
-
tested on both g++ 4.1.2 (gentoo amd64) and g++ 4.3.3 (ubuntu x86), latest thrift trunk
Description
There seems to be a conflict between the apache::thrift namespace used in the generated code and the org::apache namespace when specified in the .thrift file. I noticed this when trying to compile a c++ client for Cassandra.
It seems that since the generated c++ files are in the org::apache namespace, when the compiler sees something like apache::thrift::protocol, it tries to look for org::apache::thrift::protocol. One fix for this would be to instead use ::apache::thrift in the generated code. Another fix would be to use org::apache::thrift as the thrift namespace.
I'm attaching a minimal example (most files taken from the tutorial) to demonstrate the issue. If you change the namespace in the .thrift file (as well as the using directives in the client and server), it will compile fine.
Attachments
Attachments
Issue Links
- is related to
-
THRIFT-3317 cpp namespace org.apache issue appears in 0.9
- Closed