cvisual-studio-2010gcc

Optimal Windows C tool stack


I am planning a bigger C-only project. It should run on both Linux and Windows. My question is, what is the optimal development stack (compiler, IDE) on Windows? Problem is, we would like to use C99 (if possible). On Linux it's quite easy because usually combination GCC+VIM+GIT is optimal. But on Windows?

I am concerning: Visual Studio 2010 (no C99 support), MinGW and Intel C++ Compiler.

How do they compare with each other in terms of performance?


Solution

  • For IDE, I've happily used VC++, MonoDevelop, and Code::Blocks (the latter two are cross-platform, as a plus). C isn't a very difficult language to make an IDE for, so most anything will work and it'll just come down to personal preference.

    For compiler... C is very quick to compile on all of them, so I guess by performance you mean of generated code?

    In my experience, Intel C++ optimizes best if you're targeting Intel CPUs. MinGW GCC optimizes best for everything else. VC++ optimizes very good, but not quite as much as GCC or ICC. This is of course in the general sense only -- I've had plenty experiences where VC++ bests them both.

    VC++ compiler can integrate with some non-VC++ IDEs, like Code::Blocks. As you said, lacks C99 support (though, it does have stdint.h).

    MinGW integrates with most IDEs, except VC++. Once upon a time its port of libstdc++ lacked support for wchar_t, making Unicode apps very difficult to write. I'm not sure if this has changed.

    ICC integrates with the VC++ IDE, some non-VC++ IDEs, as well as supporting C99 and Linux, however it has been shown in the past to deliberately use sub-optimal code when used with non-Intel CPUs -- I'm not sure if this is still the case.

    Agner Fog's Optimizing software in C++ provides a decent comparison of compilers, included optimization capabilities.