Setting up Eclipse for other programming languages
Asked Answered
G

1

6

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.

Godhead answered 1/3, 2011 at 16:59 Comment(8)
I've been trying to set up Eclipse for almost a week now (even though I posted this yesterday). Come on guys -.- Also, see my other question: https://mcmap.net/q/1917322/-mingw-w64-file-layoutGodhead
Sorry for this trivial question, but have you also installed Eclipse in the 64-bit version and are sure you are using a 64-bit Java VM?Roundelay
@Martin Klinke Yes, Eclipse is 64-bit and the Java VM is also 64-bit.Godhead
I assume you already found this blog post? pinyotae.blogspot.com/2010/05/eclipse-mingw-x64.htmlRoundelay
There is also an FAQ entry on eclipse.org: wiki.eclipse.org/CDT/User/…. Maybe this helps?Roundelay
@Martin Klinke That's the guide I was trying to follow. See my edit, which describes the problems I've had along the way in more detail. Edit: Okay, I'll have a look at that FAQ entry.Godhead
@Martin Klinke That explains why it couldn't find gcc, but not about the libraries.Godhead
You can set environment variables within Eclipse from Window -> Preferences -> C/C++ -> Build -> Environment and build variables from Window -> Preferences -> C/C++ -> Build -> Build variablesEleanoreleanora
H
2

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.

Hemorrhage answered 9/3, 2011 at 2:33 Comment(2)
Not the answer I was looking for, but thank you. Pydev seemed a little bloated when I looked at it before, but I'll use it anyhow, because I seem to be having no luck whatsoever with Python DLTK. I already read the article Martin K's link lead to. It didn't help me, unfortunately.Godhead
I must say, if you're on 64 bit windows, I highly recommend you do NOT use aptana. I've spent so many hours following so many blog posts about how to keep it stable for even a few hours at a time-- to no avail. The JVM options that help on eclipse don't seem to do the same job on aptana, and no one seems to know why.Cailean

© 2022 - 2024 — McMap. All rights reserved.