[英]Using Apache Thrift in Windows
I'm interested in compiling Thrift-generated code and linking to the thrift C++ library in a windows environment.我有兴趣在 windows 环境中编译 Thrift 生成的代码并链接到 thrift C++ 库。 Doing some research, I found a few recent links:
做了一些研究,我发现了一些最近的链接:
1) Thrift Win32 Installation Using Cygwin/MinGW 1) Thrift Win32 安装使用 Cygwin/MinGW
2) THRIFT-1031 and THRIFT-1123 patches to compile in MS Visual C++ 2) THRIFT-1031和 THRIFT-1123 补丁在 MS Visual C++ 中编译
Using #1, I was able to compile a linux library using MinGW, named libthrift.a.使用 #1,我能够使用 MinGW 编译一个名为 libthrift.a 的 linux 库。 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.
但我真正想做的是能够生成 Thrift 代码,并使用 Thrift dll 或 lib 在 WINDOWS 中编译它。
In other words, I see how I can use MinGW to compile Thrift code that EXECUTES in Windows.换句话说,我看到了如何使用 MinGW 编译在 Windows 中执行的 Thrift 代码。 But I want to be able to DEVELOP AND COMPILE code that uses Thrift, in Windows.
但我希望能够在 Windows 中开发和编译使用 Thrift 的代码。 Is this possible?
这可能吗?
If not, I suppose #2 is my only option, but it seems to be still highly in development phase.如果不是,我想#2 是我唯一的选择,但它似乎仍处于开发阶段。
Any ideas?有任何想法吗?
Thrift 0.8 has Visual Studio 2010 projects for the Thrift compilier and library. Thrift 0.8 具有用于 Thrift 编译器和库的 Visual Studio 2010 项目。 A number of contributors have put in alot of hard work to support Windows VS development.
许多贡献者付出了很多努力来支持 Windows VS 的开发。 The 0.8 dev release may be downloaded as a snapshot or via SVN http://thrift.apache.org/download/
0.8 开发版本可以作为快照下载或通过 SVN http://thrift.apache.org/download/
I've created projects using Thrift in VS and it works great.我在 VS 中使用 Thrift 创建了项目,效果很好。
There´sa patch available to copile the thrift runtime with visual studio c++.有一个补丁可用于使用 Visual Studio c++ 编译 thrift 运行时。 It would be great if the thift developers put this patch in the main code.
如果 thift 开发人员将此补丁放入主代码中,那就太好了。
https://issues.apache.org/jira/browse/THRIFT-591 https://issues.apache.org/jira/browse/THRIFT-591
Thrift 0.10.0 has much better support for building on Windows. Thrift 0.10.0 对基于 Windows 的构建提供了更好的支持。
See Apache Thrift on Windows for detailed steps.有关详细步骤,请参阅Windows 上的 Apache Thrift 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.