[m-users.] What language and source file should the Windows version compile to?
Julien Fischer
jfischer at opturion.com
Wed Oct 16 14:28:29 AEDT 2019
On Wed, 16 Oct 2019, Julien Fischer wrote:
> Hi,
>
> On Tue, 15 Oct 2019, Julien Fischer wrote:
>
>> On Mon, 14 Oct 2019, galois at nycap.rr.com wrote:
>
>>> I'm using the Windows/Visual Studio 2013 version of Mercury.
>>
>> What version of Windows and Visual Studio are you using? If it isn't
>> Visual Studio 2013 and whatever version of Windows was used to build
>> that package then you are probably going to encounter problems.
>
> You didn't answer my question about which version of Visual Studio you
> are using, but I'm going to take a guess that it's a version later than
> 2013 on the basis that I get the same behaviour with later versions.
>
> The problem with later versions of Visual Studio is that Microsoft made
> some breaking changes to their libc; the Mercury Windows/Visual Studio
> 2013 will *not* work with later versions of Visual Studio.
>
> The reason you're not getting an executable is that the final link step
> is failing. (IIRC, Mercury 14.01 didn't pass the error messages from
> the linker back correctly, which is why you are not seeing indication
> of that happening other than the final executable not being present.)
All that said, you can use the Mercury compiler in that package to
compile to Java or .NET.
For Java (assuming have a Java compiler in your PATH) you need to do:
mmc --no-restricted-command-line --grade java --make hello
(The --no-restricted-command-line option is a workaround for an
unrelated problem.)
For .NET (again assuming the C# compiler is your PATH) you need to do:
mmc --grade csharp --make hello
(You will need to place the Mercury library assemblies in the same
directory as the resulting executable assembly, since the MS .NET
runtime doesn't have an equivalent of Mono's MONOPATH environment
variable.)
Julien.
More information about the users
mailing list