[m-users.] Mercury to c# workflow?

David Epstein davideps at umich.edu
Tue Jan 18 19:31:58 AEDT 2022


Hi Julien,

I'm trying to compile the example program you posted. I see you included a
Makefile, but I'm not sure how to use it. I promise I will get better at
this!

I've compiled and installed Mercury from source with the Csharp grade
enabled. The READMEs specified that I needed a UNIX environment like MSYS2
to compile Mercury but not to use it. I've added C:\mercury\bin to my path
and opened a regular command prompt. I'm following README.CSharp (using
"mercury" instead of "mmc" as recommended on Windows) but it seems to still
expect access to UNIX commands like "cp" instead of Windows commands like
"copy" (see below).

The README also says that the output will be an EXE file although I
expected a DLL file for linking to my C# code. I thought I would generate
fuitbowl.dll and add it to my C# project along with mer_std.dll and then
compile the C# project in Visual Studio, initially to a command line
program and later to an Android app with a simple GUI.

Any help would be appreciated.

Thank you,
-david

*OUTPUT FROM A WINDOWS COMMAND PROMPT*
D:\Documents\Programming\CSharp\MercuryExamples\fruitbowl>mercury --grade
csharp --make fruitbowl
Making Mercury\int3s\fruitbowl.int3
'cp' is not recognized as an internal or external command,
operable program or batch file.
Making Mercury\ints\fruitbowl.int
'cp' is not recognized as an internal or external command,
operable program or batch file.
'cp' is not recognized as an internal or external command,
operable program or batch file.
Making Mercury\css\fruitbowl.cs
Making fruitbowl.exe
'csc' is not recognized as an internal or external command,
operable program or batch file.
** Error making `fruitbowl.exe'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20220118/01f7daac/attachment.html>


More information about the users mailing list