[MLton-user] mlton-20070826 on mingw
Bernard Berthomieu
Bernard.Berthomieu at laas.fr
Mon Dec 10 09:29:31 PST 2007
Hello,
So far, we were building our mlton applications for windows using a
cross-compiler,
based on mlton-2005. We want to upgrade to mlton-2007; since a prebuilt
-20070826
for mingw is available, we gave it a try, using the latest msys 1.0 and
mingw 5.1.3,
and the prebuilt dynamic libgmp from http://cs.nyu.edu/exact/core/gmp.
We could successfully compile our applications, and they run correctly
with libgmp
dynamically linked. However, for compiling, we had to remove the
declarations of
timezone and gettimeofday from file
<mltondir>/lib/mlton/include/platform/mingw.h
as these are now provided by the current mingw headers and gcc
complained for
the redeclarations.
Now, to ease installation of our applications, I typically install
mlton so that libgmp
is statically linked with the applications, by putting a copy of
libgmp.a into
lib/mlton/self. I have seen in previous messages on this list that this
does not work
for mlton-20070826 on mingw. If I'm doing this, I get the link error:
<mltondir>\lib\mlton\self/libmlton.a(gc.o):gc.c:(.text+0x2ec5):
undefined reference to `_imp____gmpz_cmp'
<mltondir>\lib\mlton\self/libmlton.a(gc.o):gc.c:(.text+0x4289):
undefined reference to `_imp____gmpz_get_str'
<mltondir> etc,
Could someone explain me why exactly do we get the above error ?
and how one could link libgmp statically with mlton applications on that
platform.
Many thanks for any help,
Bernard.
More information about the MLton-user
mailing list