Thanks, Marc!
My message box have shown also :-) But not so easy as in your case.
Here is my makefile:
GSHOME=C:/Gambit/v4.1.2
all: gambit-ffi.exe
gambit-ffi.exe: gambit-ffi.scm
gsc -:=$(GSHOME) -link
gambit-ffi.scm
cl -nologo -c -MTd -I$(GSHOME)/include
gambit-ffi.c gambit-ffi_.c
link /out:gambit-ffi.exe /libpath:$(GSHOME)/lib
libgambc.lib user32.lib ws2_32.lib gambit-ffi.obj gambit-ffi_.obj
gambit-ffi.scm is yours:
(define mbox
(c-lambda ((pointer void) char-string char-string int) int
"MessageBoxA"))
(mbox #f "Message body here" "Caption here" 0)
Best regards,
Nick.
Marc Feeley wrote:
I tried compiling the following code using the MinGW
variant v4.1.2, and things work with no special linker options:
(define mbox
(c-lambda ((pointer void) char-string char-string int) int
"MessageBoxA"))
(mbox #f "Message body here" "Caption here" 0)
The steps are:
% gsc test.scm
% gsi test
Had you needed to link to special libraries (such as user32 and gdi32)
you would do:
% gsc -ld-options "-luser32 -lgdi32" test.scm
Marc