As the title says, I have a Windows app written in C++ from which I need to make calls to remote Thrift services, and I'm a bit lost on the subject, to be honest. http://wiki.apache.org/thrift/ThriftInstallationWin32 states that "The Thrift C++ runtime library does not currently work on Windows". Does that mean I'm shit out of luck, or is there a workaround?
I ported Thrift to Windows/C++ for my own app. Its open-source, so other people are free to make use of it: http://peoplesnote.codeplex.com/SourceControl/list/changesets
It might not be an elegant solution, but at least it should work:
According to the Thrift Wiki there are C#-bindings, but they really should be called .NET-bindings: there is nothing C#-specific about them. So you could implement your communication-library in a C++/CLI dll-library and reference that .dll from your unmanaged code.
That page seems fairly straightforward. They tell you how to make the Thrift compiler but state, in no uncertain terms, that the metacode from it won't compile under Windows.
So, short of getting someone to figure out how to compile it under Windows, you are out of luck.
To be honest, I can't see how that would be that big a deal, especially since Cygwin pretty well provides everything you need for compiling UNIX sources under Windows. I can only suggest they must be using some fairly esoteric UNIX functionality.
There are a number of approaches to take from here:
1/ Since it's entered the Apache Incubator, there may be plans to support Windows (although I can't find any). If it's truly open source and a need is identified, it's likely someone will start porting the runtimes to Windows. You may not be able to wait.
2/ Why the world needed another RPC mechanism is beyond me. But you could use one of the already-existing RPC mechanisms (SUN/ONC) or your own RPC protocol to communicate from you Windows box to a UNIX box, that then forwards the RPC via Thrift. But this is a kludge and I wouldn't do it out of principal.
Other than that, not much else I can suggest, sorry. Best of luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With