[m-users.] Mercury with Guile

Julien Fischer jfischer at opturion.com
Thu Aug 14 22:43:35 AEST 2014

Hi Tomas,

On Wed, 13 Aug 2014, Tomas By wrote:

> What is the recommended way to compile a Mercury top-level program with a
> bunch of Mercury modules plus various C add-ons (Guile, GTK) ?
> I am using "mmc --cflags [...] --ld-flags [...]

So far as linking against C libraries is concerned the options usually
required are: -L, -R and -l, plus the option --c-include-dir which is
used to specify the location of any C header files required.
(On OS X, you may also need the --framework and -F options if linking
against a framework.)

If you're linking directly against object files, you can use the
--link-object option.

The option --link-executable-command is useful to know about if you're
building an executable that links against C++ libraries.  In such a
situation you typically want to invoke the linker via the C++ compiler.

The preferred way of building Mercury programs is to use mmc --make.


More information about the users mailing list