[MLton-user] SVN r6941 MLton/MinGW32 and FFI
Matthew Fluet
fluet at tti-c.org
Tue Nov 11 05:36:05 PST 2008
On Tue, 11 Nov 2008, Wesley W. Terpstra wrote:
> On Tue, Nov 11, 2008 at 1:43 AM, Dan DuVarney
> <duvarney at reactive-systems.com> wrote:
>> For example, in /doc/examples/ffi I am observing the following behavior:
>>
>> bash-3.1$ make test_quot
>> mlton -default-ann 'allowFFI true' test_quot.sml c_quot.o
>> C:\DOCUME~1\Dan\LOCALS~1\Temp\fileT2zfil.o:fake:(.text+0x2fbe):
>> undefined reference to `__imp__c_quot'
>> C:\DOCUME~1\Dan\LOCALS~1\Temp\fileT2zfil.o:fake:(.text+0x35f0):
>> undefined reference to `__imp__call_sml_quot'
>
> I guess that you _export the function call_sml_quot, and then import
> it back? Or that call_sml_quot comes from a library you are linking
> with statically (not dynamically via a DLL)?
It is one of the examples from <src>/doc/examples/ffi.
These examples really should work 'out of the box'.
> See http://mlton.org/LibrarySupport , suggestions to improve the
> documentation are welcome.
If the symbol scopes can't be given sensible defaults for executables that
match the behavior of previous versions, then they really need to be
documented as well at:
http://mlton.org/ForeignFunctionInterfaceSyntax
More information about the MLton-user
mailing list