[Gardeners] CLISP in one EXE file and without console window for Windows
Frank Buss
fb at frank-buss.de
Fri Dec 30 01:40:08 CST 2005
Ignas Mikalajunas wrote:
> Nice thingie, sad that it doesn't really work with CFFI.
> FFI::FOREIGN-CALL-OUT just barfs something about foreign pointers
> comming from a previous lisp session. Can really advanced FFI stuff
> (callbacks, multiple libraries loaded when compiling etc.) be saved in
> memory image at all?
I didn't found FOREIGN-CALL-OUT in the documentation of CFFI. With
http://common-lisp.net/project/cffi/tarballs/cffi-051229.tar.gz and
http://www.frank-buss.de/lisp/clisp-gui.zip from
http://www.frank-buss.de/lisp/clisp.html I can use this message.lisp (you
have to install ASDF, first) :
(load "c:\\data\\projects\\asdf\\asdf.lisp")
(asdf:operate 'asdf:load-op :cffi)
(use-package "CFFI")
(cffi:load-foreign-library "user32.dll")
(cffi:defcfun "MessageBoxA" :int
(hwnd :int)
(text :string)
(capt :string)
(type :int))
(defun main()
(MessageBoxA 0 "Hello World!" "Message" 0)
(quit))
Calling "deliver.cmd" then, it generates a nice working exe file (but
zipped about 100k larger) :
http://www.frank-buss.de/lisp/message-cffi.zip
--
Frank Buss, fb at frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
More information about the Gardeners
mailing list