[MLton-user] libgmp on mingw

Dave Herman dherman at ccs.neu.edu
Wed Oct 31 13:14:36 PST 2007


I've installed the new release of MLton in MinGW and I'm getting libgmp 
errors that I can't figure out. It apparently is finding the libgmp 
library but then failing to link:

DAVE$ mlton test.sml
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x2ec5):gc.c: undefined 
reference to `_imp____gmpz_cmp'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x4289):gc.c: undefined 
reference to `_imp____gmpz_get_str'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x454b):gc.c: undefined 
reference to `_imp____gmpz_mul_2exp'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x456a):gc.c: undefined 
reference to `_imp____gmpz_fdiv_q_2exp'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x47a9):gc.c: undefined 
reference to `_imp____gmpz_com'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x4800):gc.c: undefined 
reference to `_imp____gmpz_xor'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x4a98):gc.c: undefined 
reference to `_imp____gmpz_sub'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x4d30):gc.c: undefined 
reference to `_imp____gmpz_tdiv_r'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x4fc8):gc.c: undefined 
reference to `_imp____gmpz_ior'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x5260):gc.c: undefined 
reference to `_imp____gmpz_tdiv_q'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x54f8):gc.c: undefined 
reference to `_imp____gmpz_mul'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x5790):gc.c: undefined 
reference to `_imp____gmpz_gcd'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x5a28):gc.c: undefined 
reference to `_imp____gmpz_and'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0x5cc0):gc.c: undefined 
reference to `_imp____gmpz_add'
c:\mingw\lib\mlton\self/libmlton.a(gc.o)(.text+0xb775):gc.c: undefined 
reference to `_imp____gmpz_set_str'
collect2: ld returned 1 exit status
call to system failed with signal 1:
gcc -o test C:\DOCUME~1\dherman\LOCALS~1\Temp\filezBOPCu.o 
C:\DOCUME~1\dherman\LOCALS~1\Temp\filecm6PiD.o -Lc:\mingw\lib\mlton\self 
-lmlton -lgdtoa -lm -lgmp -lws2_32 -lkernel32 -lpsapi -lnetapi32

Can anyone help? I'm stumped..

Thanks,
Dave



More information about the MLton-user mailing list