简体   繁体   中英

Using Apache Thrift in Windows

I'm interested in compiling Thrift-generated code and linking to the thrift C++ library in a windows environment. Doing some research, I found a few recent links:

1) Thrift Win32 Installation Using Cygwin/MinGW

2) THRIFT-1031 and THRIFT-1123 patches to compile in MS Visual C++

Using #1, I was able to compile a linux library using MinGW, named libthrift.a. But what I would REALLY like to do is be able to generate Thrift code, and compile it IN WINDOWS using a Thrift dll or lib.

In other words, I see how I can use MinGW to compile Thrift code that EXECUTES in Windows. But I want to be able to DEVELOP AND COMPILE code that uses Thrift, in Windows. Is this possible?

If not, I suppose #2 is my only option, but it seems to be still highly in development phase.

Any ideas?

Thrift 0.8 has Visual Studio 2010 projects for the Thrift compilier and library. A number of contributors have put in alot of hard work to support Windows VS development. The 0.8 dev release may be downloaded as a snapshot or via SVN http://thrift.apache.org/download/

I've created projects using Thrift in VS and it works great.

There´sa patch available to copile the thrift runtime with visual studio c++. It would be great if the thift developers put this patch in the main code.

https://issues.apache.org/jira/browse/THRIFT-591

Thrift 0.10.0 has much better support for building on Windows.

  1. Visual Studio projects in the source which is the recommended approach on the official site.
  2. CMake generated Visual Studio C++ projects which is not documented on the official site but turns out to be more convenient.

See Apache Thrift on Windows for detailed steps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM