[m-users.] What language and source file should the Windows version compile to?

galois at nycap.rr.com galois at nycap.rr.com
Wed Oct 16 00:50:50 AEDT 2019



	Hi Julien,

	"You shouldn't need to compile the generated source files, the
Mercury

	compiler should invoke the target language compiler for you. (You can

	see what it's doing by using the --verbose-commands option.) If it's

	not producing an .exe file (assuming your target language is C), then

	something is going wrong somewhere."

	Sorry, but I'm missing something. How do we set the target language? 

	I thought there was a default. The tutorial doesn't mention setting a
language, it just gets right into examples, and how to compile on the
command line.

	I'm willing to work with .net. But if there's a choice, I'd prefer to
generate java code, or plain .c. Does the windows version do that, or
is it necessary to run one of the linux versions?

	I'm just trying to work through the tutorial. But the process of
generating a runnable module, seems to be more complicated than the
tutorial lets on.

	Background: I do know the basics of Prolog, but wanted to work with a
strongly typed system. Visual Prolog (after version 5, which is no
longer available) overcomplicated things, by integrating it with an
OOP environment. So Mercury looked appealing.

	Maybe if you could point to the specific manual and section to start
with. Are you able to do that?

	-----------------------------------------From: "Julien Fischer" 
To: galois at nycap.rr.com
Cc: "users at lists.mercurylang.org"
Sent: Monday October 14 2019 11:20:34PM
Subject: Re: [m-users.] What language and source file should the
Windows version compile to?

 Hi,

 On Mon, 14 Oct 2019, galois at nycap.rr.com wrote:

 > I'm working through the tutorial guide, and compiled the first
 > module. Mercury seemed to have created the intermediate files and
 > folders, including an empty .err file.
 > 
 > But I cannot find a generated source file that can be compiled with
 > anything.

 You shouldn't need to compile the generated source files, the Mercury
 compiler should invoke the target language compiler for you. (You can
 see what it's doing by using the --verbose-commands option.) If it's
 not producing an .exe file (assuming your target language is C), then
 something is going wrong somewhere.

 > 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.

 > What language is it supposed to compile to, from the Windows
version? 

 By default C, unless you've explicitly told it to compile to Java or
C#.

 > Should I point it to a C Compiler? 

 It should already be pointed at one; do mmc --output-cc to see which.

 Julien.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20191015/a2e45335/attachment.html>


More information about the users mailing list