[MLton-user] mlton-20070826 on mingw

Matthew Fluet fluet at tti-c.org
Sun Dec 16 17:38:34 PST 2007


On Wed, 12 Dec 2007, Bernard Berthomieu wrote:
> What happens I guess is that the decision of whether libgmp can be linked 
> statically or
> dynamically with applications is frozen when compiling mlton, by the choice 
> of the particular
> gmp.h used to built libmlton.a.

Sounds right.

> When building applications then, one has no other choice than that made for 
> building libmlton.a,
> unless the two possible versions of libmlton.a are bundled with mlton :-(

You should be able to re-compile the runtime system (yielding a new 
libmlton.a) without needing to re-compile the compiler itself.  If you 
have a gmp.h/libgmp.a pair that corresponds to a GMP configured as a 
static library, then you could download the MLton sources, and then 
execute 'make dirs runtime' and copy the resulting 
'<src>/build/lib/self/libmlton.a' (along with libgmp.a) to 
'/mingw/lib/mlton/self'.  You'll still need a libgmp-3.dll around to run 
the compiler itself, but the resulting executables should be statically 
linked to GMP.




More information about the MLton-user mailing list