【问题标题】:Windows mistakes mmc for Microsoft Management Console when it should be Melbourne Mercury Compiler当 Microsoft 管理控制台应该是 Melbourne Mercury 编译器时,Windows 将 mmc 错误
【发布时间】:2019-02-24 05:54:25
【问题描述】:

我采取了以下步骤:

download windows binary Mercury 14.01 (Visual Studio 2013 32bit)
    (this is near the bottom of http://dl.mercurylang.org/index.html)
double click the downloaded file (it's a .exe file), it installed into 'C:\mercury-14.01-vs2013\
add 'C:\mercury-14.01-vs2013\bin' to Path
open a cmd.exe window
create file hello.m from Ralph Beckett's intro
add the hello.m file to 'C:\mercury-14.01-vs2013\bin' (illogical, Captain)
in the cmd.exe window type 'mmc --make hello'

但 Windows 会为 Microsoft 管理控制台打开一个对话框。

如何在 .m 文件上调用 Melbourne Mercury 14 编译器? 之前的 stackoverflow 问题是针对 Mercury 11.07.1 的,它指的是 Mercury 14 中没有的 README 文件。

Mercury 适合我希望的跨平台工具链:

exploratory Prolog -> Mercury -> .NET -> Xamarin.Forms in Visual Studio -> all app stores

平台:Windows 10、Mercury 14、Visual Studio Community 2017

【问题讨论】:

  • Windows 不会出错。它在遍历 PATH 中的目录时执行它找到的与该名称匹配的第一个文件。将编译器的路径放在 PATH 中的第一个而不是最后一个。或者您可以简单地将编译器重命名为不与操作系统可执行文件冲突的其他名称(如 MercMC.exe)。在任何一种情况下,您都应该向最初决定为其编译器赋予与 Windows 系统程序相同名称的开发人员投诉 - 是他们犯了错误,而不是 Windows。 :-)
  • 对这一切归结为什么进行了全面检查,所以我了解到,如果某件事有效,那是由于运气。 %-)

标签: mercury


【解决方案1】:

它在路径中在哪里很重要。试试

c:\>set path=C:\mercury-14.01-vs2013\bin;%path%

c:\>mmc

【讨论】:

  • 感谢大卫,这解决了它。我发现“设置路径”命令仅在您的答案中从 C:\> 完成时才生效,而不是从 C:\Windows\System32> 例如我所在的位置。
  • @IllogicalCaptain:这不正确。 set PATH 可以在命令提示符的任何位置工作,而不仅仅是特定目录。在命令提示符下键入 set /?
  • 路径更改可以从任何地方进行,但路径仅在当前目录之后搜索。而 mmc.exe 在 c:\windows\system32 中。
  • 原来如此,但我从来不知道它在那里。另外,我正在寻找设置并忘记。检查linklink
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-10
  • 1970-01-01
  • 2012-06-04
相关资源
最近更新 更多