[
https://issues.apache.org/jira/browse/THRIFT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Taitelbaum updated THRIFT-621:
----------------------------------
Attachment: thrift_621_add_colons.patch
This patch changes all the generated apache::thrift uses to ::apache::thrift.
The cpp tests compile and run (min time == max time == avg time == 3001151 us),
and it fixed the example attached to this bug.
> namespace cpp org.apache.* causes compilation issues
> ----------------------------------------------------
>
> Key: THRIFT-621
> URL: https://issues.apache.org/jira/browse/THRIFT-621
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (C++)
> Affects Versions: 0.1
> Environment: tested on both g++ 4.1.2 (gentoo amd64) and g++ 4.3.3
> (ubuntu x86), latest thrift trunk
> Reporter: Ben Taitelbaum
> Attachments: thrift_621_add_colons.patch, thrift_621_example.zip
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.