[MLton-user] Linking (?) 'print' means I can only run from the mingw command line

Wesley W. Terpstra wesley at terpstra.ca
Mon Sep 15 02:39:59 PDT 2008


On Sun, Sep 14, 2008 at 7:07 PM, Tom 7 <twm at andrew.cmu.edu> wrote:

> I'm trying to debug a problem with using mlton+mingw+SDL on windows.
> Everything works fine when I run my app from the mingw command line, but
> when I run it from the DOS prompt or by clicking it in explorer, it
> terminates immediately and silently.


I have reproduced this problem with r6841 on win2003/x64.

  val mb_ = _import "MessageBoxA" : MLton.Pointer.t * string * string *
> MLton.Pointer.t -> unit ;
>
This needed to be changed to _import "MessageBoxA" stdcall, though.

The problem persists with this simplified compile line:

> mlton -link-opt "-mwindows" -default-ann 'allowFFI true' clicktest.sml


Once the -mwindows is removed, the test program works. I'm currently
investigating what '-mwindows' does to the program. Do you need it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton-user/attachments/20080915/38659642/attachment.htm


More information about the MLton-user mailing list