[ 
https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

alexandre parenteau reopened THRIFT-1233:
-----------------------------------------

      Assignee: Jake Farrell  (was: Diwaker Gupta)

This change breaks the cob style compilation, here is an example below.

The problem seems to be that TMemoryBuffer definition is not getting included.

I'd suggest replace the original:

#include <transport/TTransportUtils.h>

by:

#include <transport/TBufferTransports.h>

Example:

In file included from ...sources/thrift/gen-cpp/Imaging.cpp:6:0:
...sources/thrift/gen-cpp/Imaging.h:435:22: error: 'TMemoryBuffer' is not a 
member of 'apache::thrift::transport'
...sources/thrift/gen-cpp/Imaging.h:435:22: error: 'TMemoryBuffer' is not a 
member of 'apache::thrift::transport'
...sources/thrift/gen-cpp/Imaging.h:435:64: error: template argument 1 is 
invalid
...sources/thrift/gen-cpp/Imaging.h:436:22: error: 'TMemoryBuffer' is not a 
member of 'apache::thrift::transport'
...sources/thrift/gen-cpp/Imaging.h:436:22: error: 'TMemoryBuffer' is not a 
member of 'apache::thrift::transport'
...sources/thrift/gen-cpp/Imaging.h:436:64: error: template argument 1 is 
invalid
...sources/thrift/gen-cpp/Imaging.h: In constructor 
'imaging::ImagingCobClient::ImagingCobClient(boost::shared_ptr<apache::thrift::async:\
:TAsyncChannel>, apache::thrift::protocol::TProtocolFactory*)':


> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>            Priority: Trivial
>             Fix For: 0.7
>
>         Attachments: THRIFT-1233.patch
>
>
> When using cob_style with the CPP generator, the compiler adds an include for 
> TTransportUtils. This include doesn't seem to be used anywhere and creates an 
> unnecessary dependency. It also complicates compiling Thrift generated code 
> on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to