开发者

Eclipse & C/C++ - do I need to install a compiler separately?

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)


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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜