Hello,<br><br> I'm using a bunch of external libraries, and would like to make a statically linked<br>binary. On linux I just add -link-opt '-static' and it works perfectly. On mac though,<br>the same thing gives the following error, where
<br><br>tmp.sml is<br>
<br>
val _ = print "Hello"<br><br><br>$ mlton -verbose 1 -default-ann 'allowFFI true' -link-opt '-static' tmp.sml <br>MLton 20051202 (built Fri Dec 02 11:55:50 2005 on <a href="http://darwin.sweeks.com">
darwin.sweeks.com</a>)<br>MLton starting<br> Compile SML starting<br> pre codegen starting<br> pre codegen finished in 8.16 + 2.04 (20% GC)<br> C code gen starting<br> C code gen finished in 0.05 + 0.00
(0% GC)<br> Compile SML finished in 8.21 + 2.04 (20% GC)<br> Compile C and Assemble starting<br> gcc -std=gnu99 -c -I/usr/local/lib/mlton/include -O1 \<br> -fno-strict-aliasing -fomit-frame-pointer -w -I/sw/include -o \
<br> /tmp/filemctdjQ.o /tmp/fileVl2S0f.1.c<br> gcc -std=gnu99 -c -I/usr/local/lib/mlton/include -O1 \<br> -fno-strict-aliasing -fomit-frame-pointer -w -I/sw/include -o \<br> /tmp/filekzwTsb.o /tmp/filewz5Zuz.0.c
<br> Compile C and Assemble finished in 3.48 + 0.00 (0% GC)<br> Link starting<br> gcc -std=gnu99 -o tmp /tmp/filemctdjQ.o /tmp/filekzwTsb.o \<br> -L/usr/local/lib/mlton/self -lmlton -L/sw/lib -lgmp -lgdtoa -lm \
<br> -static<br>/usr/bin/ld: can't locate file for: -lcrt0.o<br>collect2: ld returned 1 exit status<br> Link raised in 0.04 + 0.00 (0% GC)<br>MLton raised in 11.76 + 2.05 (15% GC)<br>call to system failed with exit status 1:
<br>gcc -std=gnu99 -o tmp /tmp/filemctdjQ.o /tmp/filekzwTsb.o -L/usr/local/lib/mlton/self -lmlton -L/sw/lib -lgmp -lgdtoa -lm -static<br><br><br>I can't find anything with that name on my system. <br><br>Thanks,<br><br>
Sean<br><br><br><br><br>