简体   繁体   中英

good c/c++ compiler for windows

Does anyone know of ac/c++ compiler that is easily usable with windows? I have a bit of experience with gcc, but I would like to take a crack at developing some code like this on a windows machine. Many of the compilers I have seen look a bit complex, or are not for windows.

Thanks in advance.

Usually on windows the mentality is a bit different. Rather than worrying about a compiler, you worry about getting a good IDE that does all that for you.

As a result, Visual Studio is the best option.

Visual Studio Express

MingW (which is gcc IIRC)

Cygwin with the proper packages.

g++ is available on Windows as MinGW . Alternatively, Microsoft Visual Studio is also an option (the Express version is free.)

Microsoft Visual C ++ Express版:它很好而且免费!

If you prefer open source and a IDE+compiler-package which is updated more frequently than Visual Studio (this is interesting in times of a new, nowhere fully implemented standard), then this list might be for you:

  • QtCreator + MinGW
  • CodeBlocks + MinGW
  • Eclipse + MinGW

Above is also interesting if you want to learn recent OpenMP versions. ( Microsoft seems still not interested in OpenMP 3.x , but instead seems to want to invent yet another parallel framework (as if there is not TBB and/or OpenMP already))

If you don't know where to start, download and install visual studio express from microsoft's website.

Does anyone know of ac/c++ compiler that is easily usable with windows?

Define "easy". As far as I know all compilers are easy to use once you learned how to use decent build system and have toolchain running.

Two main compilers available on windows platform are Microsoft Compiler (Visual Studio express) and MinGW+GCC. There are others (openwatcom/borland c++ builder come to mind), but they are less "popular".

To effictively develop you need 3 main components:

  1. Compiler. (microsoft compiler, gcc, intel compiler, etc)
  2. Build system. (gnu make, scons, cmake, qmake, msbuild, visual studio)
  3. Programmer's text editor. (jedit, visual studio, notepad++, far manager, midnight commander, vim, emacs).

As you can see, there are many possible combinations. For me using gnu command line utilities (from msys) with qmake and visual studio on windows platform turned out to be the most efficient setup.

The main advantage of "all in one" packages like visual studio express is that it installs all 3 components at once. Disadvantage of such package is that a beginner won't understand how program is being built, and as a result newbie won't discover more efficient setup any time soon.

You can try Dev-C++ along with mingw. Although, it's like an ant among lions, but it is still the best.

As far as problems like having an older mingw is present, why not get a new one and change some settings. But yes, if u are old school or don't like ides try, Notepad

Best options IMHO:

  • Visual c++ Express (best support for Windows development)
  • Eclipse (with CDT) + MinGW (best if you want portable code)
  • Netbeans + MinGW (similar to above)

I have been using OpenWatcom (previously simply Watcom) for close to twenty years and am very pleased with it. The IDE is simple but effective, as is the debugger.

There are some things you should know though:

  • It does not produce 64-bit x86 code
  • The C++ component is for all practical purposes non-existent
  • The root watcom directory cannot reside in a path which contains spaces (ie it can't be placed in "Program Files") so I place it in "Programx" - this quirk may have been fixed
  • I am not sure whether included file functionality can handle embedded spaces in paths either - this may also have been fixed

Tuned C code translated with the Watcom compiler is right up there with the best, especially multi-threaded code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM