tags:

views:

162

answers:

3

I'm starting to learn C, and installed the eclipse plugin for C/C++ development (the CDT plugin). I'm testing the setup with a hello world program, but it looks like the eclipse C plugin (CDT) doesn't have a compiler built in. I thought eclipse plugins were usually self-sufficient? Do I need to install a compiler separately to complete my c setup, or how do I get it to compile from within eclipse.

I did the usual: created a new c project in the eclipse workspace, created a new hello.c file that looks like this:

/*
 * hello.c
 *
 *  Created on: 2009-12-21
 *  Author: geek
 */

main(){
 printf("hello world\n");
}

Edit: OS is windows Vista Can someone suggest a compiler that's known to play nice with eclipse (or a tutorial that you've used yourself to get this sorted out)

+5  A: 

On OS X, you can install Xcode from your installation CD to get the gcc compiler, or in [Li|U]nix you probably already have gcc installed. If you're on Windows check out MinGW. Thats a free C/C++ compiler based on gcc.

goatlinks
+2  A: 

You need to have a compiler installed separately. Here is a CDT/compiler installation guide for different operating systems.

Firas Assaad
+3  A: 

Probably the easiest way to get started with C programming on Windows is to install the free Visual C++ Express Edition. It comes with a compiler built-in, and unless you really want to use Eclipse for some reason, it's probably the least friction option.

Greg Hewgill
+1 Much easier to use for C on Windows than Eclipse
Steve Rowe