简体   繁体   English

如何在Windows中使用Eclipse && MinGW设置Apache Thrift?

[英]How to set up Apache Thrift with Eclipse && MinGW in Windows?

I need to configure Thrift for Eclipse project with MinGW compiler. 我需要使用MinGW编译器配置Thrift for Eclipse项目。 I googled for it. 我用谷歌搜索。 I couldn't find proper instructions to do that? 我找不到正确的说明来做到这一点? Can somebody suggest any suitable way or proper link to do that? 有人可以建议任何合适的方式或适当的链接来做到这一点吗?

There are several partial answers to this. 有一些部分答案。

  1. The Windows build is made by means of MinGW cross compiler on a Linux machine. Windows构建是通过Linux机器上的MinGW交叉编译器完成的。

  2. Since (at least) 0.9.2 it is no longer necessary to use MinGW to build the Thrift compiler on a Windows machine. 从(至少)0.9.2开始,不再需要使用MinGW在Windows计算机上构建Thrift编译器。 1) Aside from the fact, that you don't need to do that at all, because a precompiled EXE is available on the download pages, there is a nice Visual Studio project to build the Windows Thrift compiler EXE. 1)除了事实,您根本不需要这样做,因为下载页面上提供了预编译的EXE,所以有一个不错的Visual Studio项目可以构建Windows Thrift编译器EXE。 The project has only two dependencies: Bison and Lexx/Yacc, which are both available elsewhere as precompiled Setups as well. 该项目只有两个依赖项:Bison和Lexx / Yacc,它们在其他地方也都可以作为预编译的安装程序使用。

  3. In either case MinGW is only used to build the compiler. 无论哪种情况,MinGW仅用于构建编译器。 If you want to build the libraries with MinGW, I'm not sure if that even works. 如果您想使用MinGW来构建库,我不确定那是否可行。 This way of doing things is not implemented or supported, simply because nobody needs it. 仅仅因为没有人需要,所以没有实现或支持这种做事方式。

Which brings us back to the question, why you think you "need" it this way. 这使我们回到了问题所在,为什么您认为自己“需要”这种方式。


1) To my knowledge, numerous severe problems exist with the autotools and all the stuff needed to build Thrift under MinGW on a Windows machine. 1) 据我所知,自动工具以及在Windows机器上的MinGW下构建Thrift所需的所有东西都存在许多严重问题。 You will have to patch things, build some from source, spend a lot of time and do some strange things with your file system to make it work. 您将必须打补丁,从源代码构建一些东西,花费大量时间并对文件系统做一些奇怪的事情才能使其正常工作。 At least that was the case when I stopped using MinGW to build Thrift about two years ago. 至少大约两年前,我停止使用MinGW来构建Thrift的情况就是这样。 And even if you get it to work, you still only get the compiler (which you could easily download in a fraction of that time), not the libraries. 即使您可以使用它,您仍然只会得到编译器(可以在很短的时间内轻松下载),而不会得到库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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