Skip to main content
gamedev.net
🔒 Locked

Eclipse - How to develop C++ code?

Started by FunkGnome 9 replies 950+ views
Original Post
FunkGnome
FunkGnome
I'm a big fan of the Eclipse environment. So far, I've been only using it to write Java programs for class, and I decided that I'd like to move some of my C++ projects over. The problem is, I can't seem to get my C++ code to compile. I've found several sets of instructions around the web for getting it to work. Unfortunately, something isn't adding up. Not even a simple "Hello World" program will compile. I can't elaborate any further on the problem at this point, as I'm at work right now. But I was hoping someone who has successfully been able to compile C++ using Eclipse could point me towards the proper instructions and tools neccesary to get the job done. Thanks in advance.
Trap
Trap
You need CDT (easy to google...).

Create a new C++ project and create (copy&paste from an example) a Makefile in it. Then it should work.

Edit: that way to do it is probably somewhat outdated, so RTFM
ukdeveloper
ukdeveloper
Warning: I tried Eclipse and C++ together, even when I followed all the instructions to the letter, it still didn't like it. I gave up after 3 hours fiddling and went back to Dev-C++.

You may find it works a charm - I didn't.
Trap
Trap
Did you try it with the recently released CDT 3.0? I tried it when CDT 1.x was current and didn't like it at that time.

It looks like it has been improved a lot, but I haven't had time to try it.
Promag
Promag
You need a compiler also. If you are on unix like OS then you have gcc. On windows you can install MinGW. It works like a charm :D
helix
helix
My office mate uses Eclipse for his java development. I hear screams of pain all day long from it locking up on him during something as simple as typing text. It'll literally take a couple minutes to return control after typing a single keystroke. Has any one else run into this using Eclipse?

He was going to try to use it for his c++ development until he had all these problems. Now he's one hang away from uninstalling it haha.
Aldacron
Aldacron
Quote:
Original post by helix
My office mate uses Eclipse for his java development. I hear screams of pain all day long from it locking up on him during something as simple as typing text. It'll literally take a couple minutes to return control after typing a single keystroke. Has any one else run into this using Eclipse?


Older versions were resource hogs. Each release has improved the situation so that now it's much better. Still, the more memory in the system the better. Also, don't forget there are several Hotspot command line options that can be used to tweak an apps performance. This command line should help make Eclipse snappier even on slower machines (assuming that Eclipse is being run from the JDK and not the JRE as the JRE does not ship with a server version):

C:\eclipse\eclipse.exe -server -XX:CompileThreshold=100 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Xincgc -Xms64m -Xmx128m -XX:JavaPriority10_To_OSPriority=10 -XX:JavaPriority9_To_OSPriority=9

On Windows you can right click the Eclipse icon on the desktop, select properties, and paste that into the 'target' textfield. Make sure to use the correct path, of course.
haegarr
haegarr
Well, I'm earning my money w/ Java software developed using Eclipse (version 3.1, linux). It works fine for me since I'm using a 3GHz P4 w/ 1 GB RAM (before that it was actually a pain, especially as soon as my computer run out of available RAM).

I've tried to use CDT some month ago for a C++ project, but I haven't spend enough time to come to a workable solution. The problem was not CDT itself but the already existing project w/ complex makefiles I wanted to fit into CDT. IMO CDT is worse to be tried if it is similarly comfortable as the Java plug-ins are.
helix
helix
Thanks for those command line switches, I'll forward it to him to see if it helps him at all.


Has anyone tried JEdit? I have a couple friends who were big into it for years for all their python, c++, java, etc development. I tried it but was far more happy with Visual Studio despite all it's problems.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.