<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#cccccc" text="#000000">
Thanks, Marc!<br>
My message box have shown also :-) But not so easy as in your case.
Here is my makefile: <br>
<blockquote><small><tt>GSHOME=C:/Gambit/v4.1.2</tt></small><br>
  <br>
  <small><tt>all: gambit-ffi.exe</tt></small><br>
  <br>
  <small><tt>gambit-ffi.exe: gambit-ffi.scm</tt></small><br>
  <small><tt>    gsc  -:=$(GSHOME)  -link                          
gambit-ffi.scm</tt></small><br>
  <small><tt>    cl -nologo  -c  -MTd  -I$(GSHOME)/include         
gambit-ffi.c gambit-ffi_.c</tt></small><br>
  <small><tt>    link  /out:gambit-ffi.exe  /libpath:$(GSHOME)/lib 
libgambc.lib user32.lib ws2_32.lib gambit-ffi.obj gambit-ffi_.obj</tt></small><br>
</blockquote>
gambit-ffi.scm is yours:<br>
<blockquote><small><tt>(define mbox</tt><br>
  <tt>  (c-lambda ((pointer void) char-string char-string int) int
"MessageBoxA"))</tt><br>
  <br>
  <tt>(mbox #f "Message body here" "Caption here" 0)</tt></small><br>
</blockquote>
Best regards,<br>
Nick.<br>
<br>
Marc Feeley wrote:
<blockquote
 cite="mid03B0820C-4D3A-45DD-B2C9-EDD51B4CCBDC@iro.umontreal.ca"
 type="cite">I tried compiling the following code using the MinGW
variant v4.1.2, and things work with no special linker options:
  <br>
  <br>
(define mbox
  <br>
  (c-lambda ((pointer void) char-string char-string int) int
"MessageBoxA"))
  <br>
  <br>
(mbox #f "Message body here" "Caption here" 0)
  <br>
  <br>
The steps are:
  <br>
  <br>
% gsc test.scm
  <br>
% gsi test
  <br>
  <br>
Had you needed to link to special libraries (such as user32 and gdi32)
you would do:
  <br>
  <br>
% gsc -ld-options "-luser32 -lgdi32" test.scm
  <br>
  <br>
Marc
  <br>
  <br>
</blockquote>
<br>
</body>
</html>