[mercury-users] csharp top_level.exe [was: csharp grade error in mdb.browse.cs]

Julien Fischer juliensf at csse.unimelb.edu.au
Sun Dec 19 15:57:45 AEDT 2010


Hi,

On Sat, 18 Dec 2010, Jeff Thompson wrote:

> On 12/7/2010 5:07 PM, Peter Wang wrote:
>> Now to Windows. I did change the PATH to put the Mercury bin
>>> directory in front of the Windows system directory.  At the command
>>> prompt, when I type "mmc" it invokes the compiler, but internally
>>> top_level.exe is still invoking the Microsoft Management Console. I
>>> don't know if this is some Windows Vista magic that can't be
>>> overridden.
>>> 
>> I'm not sure why mmc is called at all.  When MERCURY_COMPILER is set, it
>> should be invoked directly.  Perhaps, on Windows or .NET, the new
>> process doesn't inherit the environment from the parent process.
>> The MSDN documentation for System.Diagnostics.Process.Start is silent on
>> this point.
>> 
>> The conflict with Microsoft Management Console has been annoying for a
>> long time.  I think we should provide an ambiguous synonym, e.g.
>> mercury_mmc.
>
> I tried to compile hello_world in Windows with the "mercury.bat" supplied 
> with the distribution which I modified to use the .NET top_level.exe.  Some 
> success. It seems to invoke the compiler, but it gives this error:
>
> C:\mercury>mercury -v --csharp -m hello_world
> ** Error: error reading file `builtin.m' to generate dependencies.
> ** Module `builtin' is imported or included by module `hello_world'.
> mercury_compile: cannot find source for module `builtin' in directories .
>
> In Linux, how does mercury know where to find "builtin", etc. without needed 
> to rebuild them?

The compiler uses the the environment variables MERCURY_CONFIG_DIR and
MERCURY_STDLIB_DIR to determine where its configuration files and
libraries are installed.  (These should be set in mercury.bat, or if
on Linux etc in the mmc script.)

The above message is usually an indication that the library is either
not installed in the selected grade or that the library installation
cannot be found.

Julien.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list