[MLton] Re: r6701

Wesley W. Terpstra wesley at terpstra.ca
Tue Aug 19 03:20:17 PDT 2008


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:
val () = _export "baz": (int -> int) -> unit; (fn x => x +1)
when compiled with
mlton -default-ann 'allowFFI true' -export-header foo.h -format library
foo.sml
mlton -default-ann 'allowFFI true' -export-header foo.h -format archive
foo.sml
should produce libraries with >exactly< these public symbols:
nm -g foo.dylib | grep -v 'U '
foo.dylib(single module):
00008520 T _baz
00008868 T _foo_close
0000868c T _foo_open
nm -g foo.a | grep -v 'U '
foo.a(foo.a.o):
00007938 T _baz
00007c80 T _foo_close
00007aa4 T _foo_open

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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton/attachments/20080819/aab23dc0/attachment.html


More information about the MLton mailing list