D语言编译器DMD 1.040的变化

昨天在试用新的dwt2, 要升级dmd 编译器到1.041才能通过编译(dmd 1.037编译没有通过,基础版本没有试过),发现D语言编译器dmd 从1.040版本开始,文件目录有所变化。

D语言 changelog页面是这样写的:
http://www.digitalmars.com/d/1.0/changelog.html#new1_040

https://www.d-programming-language-china.org/dmd-1.040/

Version D 1.040 Feb 11, 2009
New/Changed Features

  • Added Mac OSX support.
  • Separated bin and lib directories into windows, linux, and osx.
  • No longer need to download dmc to use the windows version.
  • Use version(OSX) for Mac OSX. Although version(darwin) is also supported for the time being, it is deprecated.

在dmd 1.040以前的版本,dmd.exe所在的目录是

...dmd\bin\dmd.exe

在dmd 1.040及以后版本,dmd.exe所在目录(windows):

...\dmd\windows\bin

相应地,在Windows path 环境变量时也要作相应修改。

还有链接器link.exe本来在dm\bin\link.exe, 现在移到了dmd.exe同目录。Windows下,不需要再下载dmc包了,简化了安装配置,对初学者来说是个好消息。

https://www.d-programming-language-china.org/dmd-1.040/
D语言编译器DMD 1.040的变化