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

Julien Fischer jfischer at opturion.com
Thu Oct 17 00:16:00 AEDT 2019


Hi,

On Wed, 16 Oct 2019, DC wrote:

> “You didn't answer my question about which version of Visual Studio you are using”
>
> I’m not using Visual Studio, and would prefer not to.  I wanted to
> generate straight .c or .java.  But the download itself has Visual
> Studio in the name, so I was confused about whether it only generated
> Visual Studio projects, or if all of the Mercury versions (the Windows
> or Linux version) optionally generated any of the source options.  

Any version of Mercury can generate target language source code for any
of the target languages, however that's not (usually) useful in and of
itself.  The other thing the Mercury compiler must  do is "drive" a
target language compiler (e.g. gcc, clang, cl, javac, csc etc) in order
to turn the generated source code into an executable or library.

> The answer is yes, obviously, from what you are saying about the
> command line options.

The reason that package had Visual Studio in its name was that it had
been configured to use cl (i.e. the command line version of MSVC) as the
C compiler.  (Just pointing the Mercury compiler in that package at say
GCC, wouldn't work, there's around 20-30 configuration parameters that need
to be set to tell the Mercury compiler how to interact with a C
compiler.)

Julien.


More information about the users mailing list