为其他编程语言设置 Eclipse
我已经安装了用于 Java 编程语言的 Eclipse (Helios),但我还想使用它进行 C/C++、Python 和 Ruby 编程。我已经安装了 CDT 和 DLTK(适用于 Python 和 Ruby)。
我已经安装了 mingw-w64 (Windows 平台)。如何设置 Eclipse 以便它使用 MinGW 作为工具链?它显然将 MinGW 检测为工具链,但是当我创建项目时,已经出现两个警告,提示“启动外部扫描仪信息生成器时出错”。我假设这是因为它找不到编译器程序。此外,它不会检测任何标准库头文件。这些问题是否是因为我使用的是 mingw-w64 而不是标准 MinGW?
我可以使用 Ruby,但是对于 Python,它找不到解释器,也找不到默认的系统库。我已经安装了Python 2.7。我不知道如何告诉 Eclipse 在哪里查找文件。
注意:我使用的是 Windows 7 Professional 64 位。我听说使用 64 位版本 Vista 的用户无法让 mingw-w64 正常工作。我可能也遇到同样的问题。忽略 Eclipse,当我尝试使用 gcc 编译 C 文件时,它很难找到库和包含文件。
编辑:如果我通过环境变量设置 /bin/ 和 /libexec/ 的路径,我在创建项目时不会收到初始错误,但是,我想知道的是,怎么可能我通过 Eclipse 设置路径?另外,即使我设置了路径,链接器仍然找不到库和包含文件。我去了项目>属性> C/C++ 构建 >设置并尝试设置库并包含这种方式,但它仍然找不到它们(至少是库)!此外,我真的必须为每个项目都这样做吗?此选项在“窗口”>“窗口”中不可用。偏好。
I have installed Eclipse (Helios) for the Java programming language, but I also want to use it for programming in C/C++, Python and Ruby. I've installed CDT and DLTK (for Python and Ruby).
I already had mingw-w64 (Windows platform) installed. How do I set up Eclipse so that it uses MinGW as the toolchain? It apparently detects MinGW as a toolchain, but when I create a project, two warnings already appear saying "error launching external scanner info generator". I'm assuming this is because it can't find the compiler program. Also, it doesn't detect any of the standard-library header files. Could these problems be because I'm using mingw-w64 rather than the standard MinGW?
I have Ruby working, but as for Python, it cannot find the interpreter nor the default system library. I have Python 2.7 already installed. I don't know how to tell Eclipse where to look for the files.
Note: I am on Windows 7 Professional 64-bit. I've heard of people on 64-bit versions of Vista having trouble getting mingw-w64 to work. I may be having the same problem. Ignoring Eclipse, when I try to compile a C file using gcc, it has trouble finding the libraries and includes.
Edit: If I set the path to /bin/ and /libexec/ via environmental variables, I don't get the initial errors when creating a project, but, what I want to know is, how could I set the paths via Eclipse? Also, even if I set the paths, the linker still can't find the libraries and includes. I went to Project > Properties > C/C++ Build > Settings and tried to set the libraries and includes that way, but it still couldn't find them (the libraries, at least)! Moreover, would I really have to do this for every project? This option isn't available in Window > Preferences.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
至于python部分,我建议使用pydev: http://pydev.org/
这是最好的 python eclipse 插件。从代码完成、语法突出显示、virtualenv 支持 (http://pydev.blogspot.com/2010/04/pydev-and-virtualenv.html) 等等...
如果您从事 Web 开发,
来自 javascript、php、html、python、ruby...您可能还想看看 aptana。
http://www.aptana.com/
这是一个基于 Eclipse 的 IDE,有很多开箱即用的好东西,比如 git 和 subversion 插件、pydev 等... aptana 是(或者是,我切换了 IDE)可以作为常规 Eclipse 中的插件安装)
Martin K. 链接看起来不错对于 mingw 部分。
As for the python part, I recommend using pydev: http://pydev.org/
It's the best eclipse plugin for python. From code completion, syntax highlighting, virtualenv support (http://pydev.blogspot.com/2010/04/pydev-and-virtualenv.html) and so on...
If you are into web development,
from javascript, php, html, python, ruby... you also might want to take a look at aptana.
http://www.aptana.com/
It's a eclipse based IDE with lots of goodies working out of thebox, like git and subversion plugins, pydev etc... aptana is (or was, I switched IDE) installable as a plugin in a regular eclipse)
Martin K. link looks good for mingw part.