Hi Shane,

What 591 does is to make the C++ runtime library buildable in Windows using 
Visual Studio. What it does NOT do is make the compiler buildable using the 
same mechanism.

The C++ code that the Thrift compiler generates compiles just fine in Windows.  
It runs under Windows as long as you have a runtime library to support it. 
That's what my patch does for you, it makes the runtime libraries easy to 
build. You will need to run the Thrift compiler on some other platform (or 
maybe you can build it using the cygwin libraries in Windows, then run it 
there. I really don't know because we always run the compiler on a Mac 
platform, then use the generated code on Mac and Windows. And it might be that 
if you use Cygwin to be able to build the compiler, then you can also use 
Cygwin to build and use the libraries. Again, I don't know the details.) Once 
you have generated the C++ code from the compiler you can bring it into your 
Visual Studio projects and use it there.

I have recently (just before Christmas) done some tech support for another C++ 
user who is using my patched code in Windows. He was using VS 2008, so had to 
convert all of the VS projects (they were created with VS 2005). His last email 
to me said that the conversion worked with no problems, that he had built the 
libraries under VS 2008, and his application was running without problems. As 
far as I know, he is the first user besides myself.

I would certainly like to see my code become part of the standard Thrift code. 
I was waiting for the first release before I started to push for anything. It 
also seemed good to have a successful user or two. :-) I plan to add my patch 
to the 0.2 release code, and also to the head of the tree after David Reiss 
brings in the Facebook modifications, but I'm working on other things at my 
real job, so have to do that on the side. My employer would also like this code 
to become part of the distribution, just because it's a pain for us if we have 
to patch every release that we get.

Does that answer your questions?

Best regards,
Rush

On Dec 29, 2009, at 2:11 PM, Shane Gannon wrote:

> 
> Hi
> I've being evaluating Thrift for an upcoming project. A critical part of this 
> evaluation is to determine if Thrift supports C++ on Windows. The Thrift wiki 
> clearly states on its guide to ThriftUsageC++ "The first thing you need to 
> know is that the C++ code generated by Thrift compiles only on Unix based 
> systems".
> During my research I came across the ThriftMsvcPatch - Make the C++ runtime 
> library be compatible with Windows and Visual Studio 
> (http://issues.apache.org/jira/browse/THRIFT-591).
> This patch, as far as I understand, allows the Thrift C++ runtime library to 
> be built in Windows with Visual Studio. Up until now I assumed that it also 
> enabled the C++ code generated by Thrift to be executable on Windows. Hence 
> it would make Thrift an ideal candidate. But upon re-reading the description 
> I'm not so sure.
> Does the msvc patch make Thrift C++ usable in Windows? As opposed to just 
> making the runtime library buildable? Does it make the C++ code generated by 
> Thrift compilable in Windows?
> Or have I misunderstood completely? Is the C++ code generated by Thrift 
> already runnable on Windows? i.e. It just can't be compiled on Windows.
> Furthermore will this patch become part of the standard Thrift distribution?
> PS: Currently my prototyping has only been with C# and Java. For what I've 
> discovered so far I'm quite happy with Thrift. But my inexperience with C++ 
> has caused me to delay on a C++ prototype. It may also be the cause of some 
> mis-conceptions on my part as I'm literally jumping on the C++ fire with this 
> evaluation.
> RegardsShane Gannon                                     
> _________________________________________________________________
> Windows 7: Simplify what you do everyday. Find the right PC for you.
> http://windows.microsoft.com/shop

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

Reply via email to