良好的c/c++ windows编译能力

时间:2020-12-10 13:57:43

Does anyone know of a c/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.

有人知道c/c++编译器在windows中很容易使用吗?我对gcc有一点经验,但是我想尝试在windows机器上开发一些类似的代码。我见过的许多编译器看起来有点复杂,或者不是windows的。

Thanks in advance.

提前谢谢。

9 个解决方案

#1


5  

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.

通常在windows上,这种心态有点不同。而不是担心编译器,您担心的是得到一个可以为您实现这一切的良好IDE。

As a result, Visual Studio is the best option.

因此,Visual Studio是最好的选择。

#2


3  

Visual Studio Express

Visual Studio表达

MingW (which is gcc IIRC)

MingW (gcc IIRC)

Cygwin with the proper packages.

使用正确的包装。

#3


3  

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

g++在Windows中可用作MinGW。另外,Microsoft Visual Studio也是一个选项(Express version是免费的)。

#4


3  

Microsoft Visual C++ Express edition: it's good and gratis!

微软Visual c++ Express edition:这是一款不错的免费软件!

#5


3  

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:

如果您更喜欢开放源码和IDE+编译器包,它们比Visual Studio更新得更频繁(这在一个新的、没有完全实现的标准的时代是很有趣的),那么以下列表可能适合您:

  • QtCreator + MinGW
  • QtCreator + MinGW
  • CodeBlocks + MinGW
  • CodeBlocks + MinGW
  • Eclipse + 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))

如果您想了解最新的OpenMP版本,上面的内容也很有趣。(微软似乎仍对OpenMP 3不感兴趣。x,但似乎想要发明另一个并行框架(好像没有TBB和/或OpenMP)

#6


2  

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

如果你不知道从哪里开始,可以从微软的网站上下载并安装visual studio express。

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

有人知道c/c++编译器在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".

windows平台上可用的两个主要编译器是Microsoft Compiler (Visual Studio express)和MinGW+GCC。还有其他(openwatcom/borland c++ builder),但它们不太“流行”。

To effictively develop you need 3 main components:

要有效地开发,你需要三个主要部分:

  1. Compiler. (microsoft compiler, gcc, intel compiler, etc)
  2. 编译器。(microsoft compiler, gcc, intel compiler等)
  3. Build system. (gnu make, scons, cmake, qmake, msbuild, visual studio)
  4. 构建系统。(gnu make, scons, cmake, qmake, msbuild, visual studio)
  5. Programmer's text editor. (jedit, visual studio, notepad++, far manager, midnight commander, vim, emacs).
  6. 程序员的文本编辑器。(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.

如您所见,有许多可能的组合。对我来说,使用gnu命令行实用工具(来自msys)和qmake以及windows平台上的visual studio是最有效的设置。

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.

像visual studio express这样的“所有在一个”包的主要优点是它同时安装所有3个组件。这样的包的缺点是初学者无法理解程序是如何构建的,因此新手在短时间内不会发现更有效的设置。

#7


1  

Best options IMHO:

IMHO最佳选择:

  • Visual c++ Express (best support for Windows development)
  • Visual c++ Express (Windows开发的最佳支持)
  • Eclipse (with CDT) + MinGW (best if you want portable code)
  • Eclipse(使用CDT) + MinGW(如果需要可移植代码,最好是这样)
  • Netbeans + MinGW (similar to above)
  • Netbeans + MinGW(类似于上面)

#8


1  

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

您可以尝试使用dev - c++和mingw。虽然它就像狮子中间的蚂蚁,但它仍然是最好的。

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

就像有一个老的mingw一样,为什么不换一个新的呢?但是,如果你是老学生或者不喜欢ide,试试记事本

#9


0  

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.

我已经使用OpenWatcom(之前只是Watcom)将近20年了,我对它非常满意。IDE简单而有效,调试器也是如此。

There are some things you should know though:

但有些事情你应该知道:

  • It does not produce 64-bit x86 code
  • 它不生成64位x86代码
  • The C++ component is for all practical purposes non-existent
  • c++组件实际上不存在
  • The root watcom directory cannot reside in a path which contains spaces (i e it can't be placed in "Program Files") so I place it in "Programx" - this quirk may have been fixed
  • 根watcom目录不能驻留在包含空格的路径中(我不能把它放在“程序文件”中),所以我把它放在“Programx”中——这个特性可能已经被修复了。
  • 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.

使用Watcom编译器翻译的经过调优的C代码就是最好的,特别是多线程代码。

#1


5  

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.

通常在windows上,这种心态有点不同。而不是担心编译器,您担心的是得到一个可以为您实现这一切的良好IDE。

As a result, Visual Studio is the best option.

因此,Visual Studio是最好的选择。

#2


3  

Visual Studio Express

Visual Studio表达

MingW (which is gcc IIRC)

MingW (gcc IIRC)

Cygwin with the proper packages.

使用正确的包装。

#3


3  

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

g++在Windows中可用作MinGW。另外,Microsoft Visual Studio也是一个选项(Express version是免费的)。

#4


3  

Microsoft Visual C++ Express edition: it's good and gratis!

微软Visual c++ Express edition:这是一款不错的免费软件!

#5


3  

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:

如果您更喜欢开放源码和IDE+编译器包,它们比Visual Studio更新得更频繁(这在一个新的、没有完全实现的标准的时代是很有趣的),那么以下列表可能适合您:

  • QtCreator + MinGW
  • QtCreator + MinGW
  • CodeBlocks + MinGW
  • CodeBlocks + MinGW
  • Eclipse + 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))

如果您想了解最新的OpenMP版本,上面的内容也很有趣。(微软似乎仍对OpenMP 3不感兴趣。x,但似乎想要发明另一个并行框架(好像没有TBB和/或OpenMP)

#6


2  

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

如果你不知道从哪里开始,可以从微软的网站上下载并安装visual studio express。

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

有人知道c/c++编译器在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".

windows平台上可用的两个主要编译器是Microsoft Compiler (Visual Studio express)和MinGW+GCC。还有其他(openwatcom/borland c++ builder),但它们不太“流行”。

To effictively develop you need 3 main components:

要有效地开发,你需要三个主要部分:

  1. Compiler. (microsoft compiler, gcc, intel compiler, etc)
  2. 编译器。(microsoft compiler, gcc, intel compiler等)
  3. Build system. (gnu make, scons, cmake, qmake, msbuild, visual studio)
  4. 构建系统。(gnu make, scons, cmake, qmake, msbuild, visual studio)
  5. Programmer's text editor. (jedit, visual studio, notepad++, far manager, midnight commander, vim, emacs).
  6. 程序员的文本编辑器。(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.

如您所见,有许多可能的组合。对我来说,使用gnu命令行实用工具(来自msys)和qmake以及windows平台上的visual studio是最有效的设置。

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.

像visual studio express这样的“所有在一个”包的主要优点是它同时安装所有3个组件。这样的包的缺点是初学者无法理解程序是如何构建的,因此新手在短时间内不会发现更有效的设置。

#7


1  

Best options IMHO:

IMHO最佳选择:

  • Visual c++ Express (best support for Windows development)
  • Visual c++ Express (Windows开发的最佳支持)
  • Eclipse (with CDT) + MinGW (best if you want portable code)
  • Eclipse(使用CDT) + MinGW(如果需要可移植代码,最好是这样)
  • Netbeans + MinGW (similar to above)
  • Netbeans + MinGW(类似于上面)

#8


1  

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

您可以尝试使用dev - c++和mingw。虽然它就像狮子中间的蚂蚁,但它仍然是最好的。

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

就像有一个老的mingw一样,为什么不换一个新的呢?但是,如果你是老学生或者不喜欢ide,试试记事本

#9


0  

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.

我已经使用OpenWatcom(之前只是Watcom)将近20年了,我对它非常满意。IDE简单而有效,调试器也是如此。

There are some things you should know though:

但有些事情你应该知道:

  • It does not produce 64-bit x86 code
  • 它不生成64位x86代码
  • The C++ component is for all practical purposes non-existent
  • c++组件实际上不存在
  • The root watcom directory cannot reside in a path which contains spaces (i e it can't be placed in "Program Files") so I place it in "Programx" - this quirk may have been fixed
  • 根watcom目录不能驻留在包含空格的路径中(我不能把它放在“程序文件”中),所以我把它放在“Programx”中——这个特性可能已经被修复了。
  • 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.

使用Watcom编译器翻译的经过调优的C代码就是最好的,特别是多线程代码。