Hi Dheeraj,

Ah, I see now. I'm sorry, there are things that I have forgotten about since we 
haven't touched our Thrift installation in about 15 months.

If you want to use the latest and greatest Thrift release on Windows, you 
probably do need to use some Cygwin magic to make it work, even in your code 
because of the includes that you mention. What we use here is an old (pre-0.1) 
version of Thrift that we have patched with my 591 patch 
(https://issues.apache.org/jira/browse/THRIFT-591). That builds Thrift with 
Visual Studio and gets rid of all the Unix-specific stuff. There has been some 
work done to make that compatible with the 0.4 release of Thrift, but I 
understand that it is incomplete.

I don't know what your other options are for using Thrift with a C++ app 
running on Windows. There is a C# port, but I don't know anything about it or 
interoperability, etc.

I'm sorry I don't have anything better to offer you.

- Rush

On Nov 11, 2010, at 12:51 PM, Dheeraj Goswami wrote:

> Hi Rush,Let me be more clearer.
> The generated code say abc_types.h includes <Thrift.h> and this Thrift.h 
> includes the <netinet/in.h> which is where it is complaining about. Is there 
> any other way to include the Windows version of Thrift.h to keep the Windows 
> compiler happy...
> 
> thanks,
> 
> --dheeraj
> 
> --- On Thu, 11/11/10, Rush Manbert <[email protected]> wrote:
> 
> From: Rush Manbert <[email protected]>
> Subject: Re: A Basic Question - Mac OSX & Windows
> To: [email protected]
> Date: Thursday, November 11, 2010, 12:39 PM
> 
> We are talking about the source code generated by the Thrift compiler here, 
> aren't we? If not, then I answered the wrong question.
> 
> If so, then I will qualify my answer by saying that I run an older version of 
> Thrift. But I would be surprised if the generated code now includes 
> Unix-specific header files. If that has happened, then you probably need to 
> look into having a separate compiler on each platform.
> 
> Does this answer make sense?
> 
> - Rush
> 
> On Nov 11, 2010, at 12:05 PM, Dheeraj Goswami wrote:
> 
>> Thanks Rush. but how do you deal with errors like Unixish code like 
>> netinet/in.h is complaining. Also we use pthread in MacOSX, how they will be 
>> translated etc?
>> We have Visual Studio project for WIndows. 
>> If you can provide little bit more detail that will be helpful.
>> 
>> thanks,
>> 
>> --dheeraj
>> 
>> --- On Thu, 11/11/10, Rush Manbert <[email protected]> wrote:
>> 
>> From: Rush Manbert <[email protected]>
>> Subject: Re: A Basic Question - Mac OSX & Windows
>> To: [email protected]
>> Date: Thursday, November 11, 2010, 11:59 AM
>> 
>> You can go either way, but you can certainly generate the code on one 
>> platform and use it on the other. We have exactly the same situation. All of 
>> our Thrift code is generated on the Mac and we check it into our SVN 
>> repository from there. The Windows side just uses the generated source.
>> 
>> - Rush
>> 
>> On Nov 11, 2010, at 11:45 AM, Dheeraj Goswami wrote:
>> 
>>> Hi All,I have a basic question.
>>> I need to run the thrift on Mac OSX and Windows. So do I need to generate 
>>> our code (using our thrift IDLs) on both the platforms (using respective 
>>> thrift compilers) separately OR the code generated on Mac OSX can be 
>>> compiled and linked on Windows as well (using some cygwin kind of stuff) ? 
>>> What is the recommendation and suggestion?
>>> 
>>> thanks,
>>> 
>>> --dheeraj
>> 
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to