[ https://issues.apache.org/jira/browse/THRIFT-1031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103736#comment-13103736 ]
James Dickson commented on THRIFT-1031: --------------------------------------- Hi all, Please accept my apologies for the long radio silence, other tasks have somewhat occupied my time lately. However, over the past week I have been working on a newer version of the patch, one which I hope addresses all concerns and requests. I greatly appreciate all the feedback you have given me. This patch leaves the original code base completely unchanged. Where classes are completely incompatible with windows I have rewritten the incompatible parts and branched the implementation thus maintaining the same interface. It is not complete, there are still some Transport classes needing to still be ported, but the majority has been. I have also ported the compiler to compile under MSVC, as far as I can tell it works in it's entirety, however I would really appreciate testing of the various other languages as I have mainly concentrated on the C++ side of code generation. I have only given a cursory run of the other language generators. As to why I ported the compiler, this is so I can generate the testing code so that I can port all the test cases and make sure the library is equal to it's linux counterpart. >From the readme: {quote} Using Thrift with C++ ===================== You need to define an enviroment variable called THIRD_PARTY. The project assumes that you have extracted the dependancies into their default structure into the path defined by THIRD_PARTY. e.g. $(THIRD_PARTY)/boost/boost_1_47_0/ Thrift is divided into two libraries. libthrift The core Thrift library contains all the core Thrift code. It requires boost shared pointers and pthreads_win32. libthriftnb This library contains the Thrift nonblocking server, which uses libevent. To link this library you will also need to link libevent. You MUST apply this patch to make generated code compile. https://issues.apache.org/jira/browse/THRIFT-1139 Linking Against Thrift ====================== You need to link your project that uses thrift against all the thrift dependancies; in the case of libthrift, pthreads_win32, boost and for libthriftnb, libevent. In the project properties you must also set HAVE_CONFIG_H as force include the config header: "windows/confg.h" Dependencies ============ boost shared pointers http://www.boost.org/libs/smart_ptr/smart_ptr.htm libevent (for libthriftnb only) http://monkey.org/~provos/libevent/ pthreads win32 http://sources.redhat.com/pthreads-win32/ Known issues ============ - Endianess has not been fully tested, may not work with doubles. - Currently does not support the non-blocking connect path. - Only supports the creation of clients, server sockets are not yet ported. - Does not support named pipes. (Supported in unix through unix domain sockets). TODO ==== - Port remaining classes in libthrift: - PosixThreadFactory - TFDTransport - TFileTransport - THttpClient - THttpServer - TSimpleFileTransport - TSSLSocket - TServerSocket - Port remaing classes in libthriftnb: - TNonblockingServer - Port test cases. (Not even started this. Run test cases in release mode?) - Autolink libraries depending on debug\release build. - Auto versioning. {quote} > Patch to compile Thrift for vc++ 9.0 and 10.0 > --------------------------------------------- > > Key: THRIFT-1031 > URL: https://issues.apache.org/jira/browse/THRIFT-1031 > Project: Thrift > Issue Type: Improvement > Components: C++ - Library > Environment: Windows XP 32bit, vc++ 9.0, 10.0 > Reporter: James Dickson > Priority: Trivial > Fix For: 0.8 > > Attachments: thrift_msvc.patch, thrift_msvc_v0_1.patch, > thrift_msvc_v0_2.patch, thrift_msvc_v0_2.patch > > > At our company we need clients running on Windows being able to connect to > our linux servers running hypertable. The attached patch enables the parts > needed by Hypertable to be compiled on Windows using either the VC++ 9.0 or > 10.0 compilers. > Having read previous posts about ports using boost::asio we found these to be > too intrusive for our needs. This version uses pthreads_win32 and winsock2 > and is as designed to be as un-intrusive as is possible to the original unix > code base. It is mostly #defines between unix sockets and winsock2 sockets. > We also tried to follow the folder structuring of the C# runtime that has > visual studio solutions to be consistent. > More details are in the README as not all the functionality of the original > unix code base is available to windows users. We will add the missing > functionality, we just wanted to share what we had as for a Windows based > client for us it is sufficient. > The patch is based on the latest revision in SVN, we would love feedback and > any code reviews. If there is any possibility of this being added to the main > trunk then that would be much appreciated, however we don't expect that. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira