(6/15)Emma, (and any other UCSD rising sophmores), Here’s what I recommend in order to get started on C under Eclipse:
- Download the latest Eclipse(Kepler SR2). I got it from here.
- Install the C Dev Tools package thusly:
- Copy this: http://download.eclipse.org/tools/cdt/releases/kepler
- Go to Help>Install New Software
- Click Add
- In “Name” type “CDT” or something.
- Paste the url above into the Location field. Click OK.
- In the “Work With” field, type CD. it will auto complete to the CDT.
- Click both CDT Main Features and CDT Optional Features.
- Click Finish, and click yes on the license radio buttons.
- You will have to restart Eclipse
- Download a C compiler. I assume its on a mac, so I have no idea how to do that. (Still a hardened windows/linux guy. But this post seems to know what to do.
- Once you do that go into eclipse
- Go to File>New>Project…
- Choose c/c++ project
- Ignore any warnings about g++ if you get them.
- Create a file called main.c
- Paste this into it:
/* Hello World program */ #includemain() { printf("Hello World");
}
Then do “Project>Build All” and then a Debug.
Then its all pretty standard.
FYI:
This is a decent handout from Stanford with some ideas on install and debugging.