Which is the best IDE for C?

Currently using Dev-Cpp. I am just wondering if there's any other better IDE around.

Eclipse, NetBeans, Dev-Cpp, CodeBlocks or other???

thanks!

vc++ 2010 Express. Most IDE's and compilers will compile both C and C++, depending on the file extension is *.c or *.cpp or *.cc. It will also depend on the operating system you are using.

I've always said that the best IDE for any project is the one you're most accustomed to. Assuming the one I've been using doesn't meet my needs in some way, then I look for newer versions of whatever I've been using before branching out.

I expect any change of development environment to slow me down for a while. It may only cost me a few hours, but it can cost days if I have to learn new coding habits before I can make best use of the tools.

In other words, the final choice really depends on what you need to do. VC is pretty comprehensive under Windows.

I usually prefer an IDE that will aid me on my coding (like with intellisense, documentation, indenting, for instance) since it's easier that way to track my classes, functions, variables, etc, so I use VS2010

Myself, I've always preferred a simple editor like Gedit or Vim.

I like Eclipse since it is cross platform, I don't have to remember different keyboard short-cuts as a switch back and forth between Linux and Windows. Although it does have a few features I find irritating, but is also has features I miss when using VC++.

CodeBlocks is good too for that reason, also it is rather more light-weight than Eclipse.

The problem with Dev-cpp is that it has been out of support for a while now (> 2 years) and the compiler that comes with it is also out of date.

thanks~I will try them out and choose the one I'm most comfortable with.

Does Eclipse allow users to compile single file? Or it is compulsory to create a project every time?

Eclipse doesn't you have to create a project. In fact in almost all IDEs I have used you have to create a project first.

If rather than working on a few multi-file projects you need to work on lots of single file programs I would recommend Geany. This is less of an IDE and more of an editor but it does allow you to compile and link any file without the need for project files.

I seem to recall someone telling me Notepad++ will do that too. It's only a text editor so you will have to have a compiler such as MinGW installed too.

In the old days of MS-DOS before IDEs became popular I just used command-line builds and created small batch files to run the compiler + all of its flags so that I didn't have to type them every time I wanted to compile a program. And you can still work like that if you wish. That's a good way to become intimately familiar with how your compiler works.

I use Notepad++ extensively at work, along side Eclipse and Visual Studio, and have never noticed this, I will have to check tomorrow.

Of course Geany has the advantage over Notepad++ that it is available for both Windows and Linux.

Actually I do not know much about how those compilers and linkers work. Do you have any good websites that talk about these things?

You mean how compilers turn your source files into object code? Read all about compiler creation. Start by reading a few of these google links.

I think the only IDE that will let you compile a single file is actually DevC++ .. I use codeblocks (Probably the best I have used so far; lightweight, autocompletion, and several useful plugins)..

If you are on a Unix system you can always just save the file and go command line

g++ file.cpp

If you are on a Unix system you can always just save the file and go command line

g++ file.cpp

Actually that works on Windows too

mingw32-g++ -Wall -pedantic file.cpp

or

cl file.cpp

for Microsoft

You mean how compilers turn your source files into object code? Read all about compiler creation. Start by reading a few of these google links.

Actually, what I want to know is what are those settings in the "Global Compiler Settings" for(see attachments). What is a make program? What does it do?

Also, why does Code::Blocks create a file with .o extension every time I compile a file? This doesn't occur in Dev-Cpp.

The .o is the object file that is later linked into the program and Dev=C++ almost certainly does create the same file although it might name it .obj or do a better job of hiding it.

Link Libraries are any additional libraries you need to link your program against, libws2_32.a or just ws2_32 (that is the Windows Socket library) for example. Linker options are for extra switches to the linker program.

The make program is a utility that actually controls the build. Many IDEs don't necessarily call a make program to perform the build since they often contain that functionality themselves but some projects are supplied with a makefile which defines how to build the project and in that case you build the project (common called a Make File Project) by passing the makefile to the make program.

Wikipedia as an article that will give you the basics about makefiles.

I prefer Net Beans coupled with gcc on Linux right now...

Visual Studio is also cool...

On the left attached thumbnail is where you add switches for the linker.

For example, to use the crypt() function in linux (I believe Windows has the crypt() function too, but don't quote me) you must supply -lcrypt in the "Other linker options."

For compiler settings this may be useful:
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.