Nim使用哪个C编译器来生成可执行文件?

huangapple go评论52阅读模式
英文:

What c compiler does nim use to make exe file?

问题

我安装nim后,需要安装gcc或其他c编译器来编译我的代码成可执行文件吗?如果需要,它使用哪个c编译器?gcc、tcc、clang等。不要误解,我不想将nim代码转换成c。我只想知道将nim翻译成c后它使用哪个编译器来生成机器码。在确保其真正运作方式之前,我不想安装它。

英文:

Should I install gcc or other c compiler after installing nim to compile my code to an executable file or it contains? If it contains, which c compiler it uses? gcc, tcc, clang etc.

Don't get me wrong, I dont want to convert my nim code to c.

I just want to know what compiler it uses after translating nim to c to make mashin code.

I don't want to install it before I'm getting sure, how it really works.

答案1

得分: 2

From the install on Linux/Unix/macOS page:

> The Nim compiler needs a C compiler in order to compile software. You must install this separately and ensure that it is in your PATH.

<sub>[Emphasis mine]</sub>

So yes you need to install a C compiler for it to work. There's no mention about which compiler to install or use, so it probably uses the common alias cc to build the C source.

You can install the default compiler for your platform and it should work.


The Windows download page recommends MinGW, which is GCC.

英文:

From the install on Linux/Unix/macOS page:

> The Nim compiler needs a C compiler in order to compile software. You must install this separately and ensure that it is in your PATH.

<sub>[Emphasis mine]</sub>

So yes you need to install a C compiler for it to work. There's no mention about which compiler to install or use, so it probably uses the common alias cc to build the C source.

You can install the default compiler for your platform and it should work.


The Windows download page recommends MinGW, which is GCC.

huangapple
  • 本文由 发表于 2023年5月10日 18:18:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/76217249.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定