<div dir="ltr">I don't have a i386 with osx, but I gather from this checkin that .hidden doesn't work. Could someone try ".private_extern" instead? If it works, this program:<br><div style="margin-left: 40px;">
val () = _export "baz": (int -> int) -> unit; (fn x => x +1)<br></div>when compiled with<br><div style="margin-left: 40px;">mlton -default-ann 'allowFFI true' -export-header foo.h -format library foo.sml<br>
mlton -default-ann 'allowFFI true' -export-header foo.h -format archive foo.sml<br></div>should produce libraries with >exactly< these public symbols:<br><div style="margin-left: 40px;">nm -g foo.dylib | grep -v 'U '<br>
</div><div style="margin-left: 40px;"><div style="margin-left: 40px;">foo.dylib(single module):<br>00008520 T _baz<br>00008868 T _foo_close<br>0000868c T _foo_open<br></div></div><div style="margin-left: 40px;">nm -g foo.a | grep -v 'U '<br>
</div><div style="margin-left: 40px;"><div style="margin-left: 40px;">foo.a(foo.a.o):<br>00007938 T _baz<br>00007c80 T _foo_close<br>00007aa4 T _foo_open<br><br></div></div>It should be possible to use both libraries in a C program that only links with '-lfoo -lgmp'. (ie: libmlton.a and libgdtoa.a should be compiled in)<br>
<br></div>