[m-users.] Building Mercury Modules with Functions to be Called from C
charles.shuller at gmail.com
Wed Sep 12 22:51:13 AEST 2018
When attempting to build a library of mercury functions to be called from
C, I wind up individually compiling to C, then using C tools for everything
else. Is there a better approach??
What I've got working in my Proof of Concept is to compile each module
mmc --grade hlc --compile-to-c min.m
And then use my C compiler (gcc) on the output C file.
In larger apps, I'd like to try and mirror the approach I use with C, which
is to build a convenience library (i.e. a static lib that is only ever used
by main and unit tests of the project, and is statically linked against)
and call into mercury modules from there.
I thought there was a command that would easily do that, something like:
mmc --make my_lib.a, but I can't find the docs anymore.
Additionally, I am hoisting up my larger projects with CMake, instead of
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users