Setting up Eclipse for other programming languages - eclipse

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.

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.

Related

How to use the "Resource Files" logical folder in Netbeans IDe for C/C++?

As can be seen in the below screenshot, a Netbeans C/C++ project allows the addition of resource files. When I Google things along the lines of "Netbeans C/C++ 'Resource Files," nothing useful comes up. As such, I ask here: what are they and how can I use them? Is it just a logical folder that the application can use at runtime with regular fstreams, or does it allow the embedding of files in the final executable similar to Java's getClass().getResourceAsStream() mechanism?
NOTE: I am using g++ 5.4.0 on Ubuntu 16.04 LTS x64 if these are platform independent in any way (in which case I would like to know how to use them on Windows and other versions of Linux as well).

can eclipse C/C++ IDE be used for java too?

I have downloaded .tar.gz install file for C/C++ eclipse IDE.
Can it also be used for java or do I need additional ?
Yes it is, you should install the right plugin - JDT (look at Help->Install new Software)
Base on wiki link:
In computer programming, Eclipse is an integrated development
environment (IDE). It contains a base workspace and an extensible
plug-in system for customizing the environment.
That means Eclipse is just a platform, and you can install any plugins for eclipse. On Eclipse site, you see some packages such as Eclipse CDT Eclipse JDT ... Because they just want you to have a convenient environment for working: just download and run. You can download any versions, and install enough other plugins and they will works well. Here is some tutorials: official link and another nice link
But my recommendation is:
you don't know how "enough" is (as newbie). So the result will be hard because you don't choose enough packages for supporting your languages. And Eclipse Foundation has made it for you.
You shouldn't use many languages in same Eclipse distribution (although you can switch to other workspace easily). Many languages mean many installed packages, and this will slow down your eclipse so much because eclipse must loads more plugins into memory, loads more projects ... This is my experience. So, each language, each eclipse distribution, each workspace. That's a trick.
And answering directly to your question:YES. You can use that version for programming java, but will need to install JDT (Java Development Toolkit) plugin.
Hope this help :)

Eclipse IDE different languages configuration

my question may be silly but I am in a weird situation right now. I am currently using the latest edition of Eclipse IDE configured for android development ,downloaded from the android developers site. I am trying to install other languages to it like C++ and no matter what I do I get the binary not found when I try to compile a C++ programm. I installed different editions of compilers and I get the same problem .So here is my question:
Do I have to download a different edition of Eclipse to install the other languages or am I doing anything wrong?
Take a look at this tutorial on how to ready eclipse for C++, perhaps it will help you locate your problem
C++ for Eclipse

What is the purpose of Java JDK to Eclipse?

I've just installed Eclipse, after i installed the java JDK.
The Getting Started guide (in Eclipse) says i should reference my JDK installation in Window>Preferences>Java>Installed JREs, but that a JRE would also work.
Select the Java > Installed JREs preference page to display the installed Java Runtime Environments. Confirm that a JRE has been detected. By default, the JRE used to run the workbench will be used to build and run Java programs. It should appear with a checkmark in the list of installed JREs. We recommend that you use a Java SDK instead of a JRE. An SDK is designed for development and contains the source code for the Java library, easing debugging.
There was already a JRE set up there (not a JDK), so i did nothing and tried to compile a Hello World (just to see what would happen). To my surprise, it compiled!
I searched a little bit and it looks like this works because Eclipse has a built-in Java Compiler. I tried debugging using the same eclipse set up, and it was also successful.
So, what is the difference between setting a JDK and JRE there? Why is it important to download the JDK, since in my default configuration Eclipse doesn't seem to use it?
Probably the main difference is you get the source to all of the Java runtime libraries (with the JDK) which can be a big help. I always use the JDKs for that reason.
Also if you are debugging, this will allow you to meaningfully step into Java runtime libraries.
There are a number of tools that come with the JDK that don't come with the JRE - JConsole (http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html) springs to mind. This for example can help you understand & monitor the memory usage of your application and so on. Either way if you head into unfamiliar territory, I highly recommend you follow the Eclipse suggestion and use the JDK!
JDK is equipped with different helpful tools, as DotMasta mentioned. Eclipse's "version" of JDK is called JDT. Apart from range of shipped tools, there are also differences between javac and Eclipse built-in compiler ecj, so check here to see the comparison. One of the most important differences is that javac is strict, i.e. with ecj you can create a class file even in case of errors in code, which is perfectly suitable for testing phase, but not for launch :)
JDK contains software development tools which are used to compile and run the Java program.
Plenty of classes and methods in standard jdk library
Javac java compiler
Diffrences and why you will need this?
JDK includes the JVM, standard class libraries, and several other tools that a developer needs in order to create a Java program.
JRE includes the JVM, as the JRE provides some standard libraries and the JVM which can be used to execute a Java program.
You can even look there: http://en.wikipedia.org/wiki/Java_Development_Kit

eclipse crashing with intellisense

Eclipese crashes on one (and only it appears) intellensense.
typing "Display.getW" (towards the Display.GetWidth() function) as I type W eclipse reproduceably crashes. Trying random other functions and classes yield no problems.
Any ideas as to what this might be?
Eclipse Info: Eclipse Java EE IDE for Web Developers.
Build id: 20100218-1602
Eclipse Galileo
Edit: Using windowsXP
The only bugs related to a crash on auto-completion all mention Linux platform and an issue with xulrunner library.
See for instance bug 236724:
You don't need to download an older version of xulrunner since the problem is merely that the 64bit version of the library is being loaded rather than the 32bit library.
To rectify this, just add the following line to your eclipse.ini file which points to the 32bit version of the xulrunner library:
-Dorg.eclipse.swt.browser.XULRunnerPath=<path_to_32bit_xulrunner_lib>
On RHEL5 for example, the path would be /usr/lib/xulrunner-1.9.
So you would in this case either need an older version of xulrunner, or fixing its path.
On Windows, on the other hand, that may be a good opportunity to fill in a new bug report.
Update February 2012, Raedwald mentions in the comments:
The relevant Eclipse FAQ "Can I specify which XULRunner installation gets used?"
This can also fix the problem if you provide as the XULRunnerPath a path-name that does not point to an xulrunner library directory.
What happens is that Eclipse instead falls back to using an internal renderer.
I believe this is the only solution if your O/S (such as RedHat 5.8) upgrades you to a FireFox version that uses xulrunner-2 but does not provide webkitgtk.
This, and related problems, are caused by incompatibilities between Eclipse and xulrunner, which is a component of Fire Fox. I came across this problem today, after updating Fire Fox on my RHEL 5 development computer.
The "intellisense" (content assist) feature, and other features of Eclipse, are a rendering of HTML. Eclipse tries to hand-off this rendering work to a system component. If your web browser is Fire Fox, Eclipse traditionally uses xulrunner, which is intimately associated with Fire Fox. It does so by calling a C API through a native library. However, that API is subject to change by the Mozilla developers, and different versions of xulrunner have had incompatible APIs. In particular, Eclipse can not use "xulrunner 2", which is the version in recent versions of Fire Fox.
Newer versions of Eclipse try not to use xulrunner at all, but instead try to use webkitgtk. However, if that is not present, or Eclipse is configured not to use it, Eclipse will fall back to using xulrunner. Which can then crash, because Eclipse does not detect that the available xulrunner is incompatible. The Eclipse developers recognize this as a Bad Thing (it is Bug 262929), but it no yet fixed (still in Eclipse 3.7).
Therefore, if webkitgtk is present on your computer, it might be better to tell Eclipse to use it. The Eclipse FAQ says how to do this: set the Java property org.eclipse.swt.browser.UseWebKitGTK to true. You can do so in your eclipse.ini file (as told elsewhere) by adding the line -Dorg.eclipse.swt.browser.UseWebKitGTK=true at the end of the file.