Nov 132009
 

Finally I had to build my own instead doing package installation, and building Thrift is not that difficult (after you go through it once …).

You definitely need to read requirements for building Thrift, but things are not quite clear at the first glance, dependency list is not clear, so here are what I installed before “./bootstrap.sh; ./configure; make; sudo make install”, note that this is the package list for Fedora, but it should be similar to Ubuntu:

  • subversion
  • gcc-g++
  • java-1.6.0-openjdk-devel
  • perl-devel
  • python-devel
  • php-devel
  • mono-devel
  • boost-devel
  • libtool
  • bison
  • flex
  • perl-ExtUtils-MakeMaker

After all these installed, it will work like a chime.

Jul 072009
 

Now here are steps to build a Windows application as for “hello, world” ๐Ÿ™‚

Create a message.lisp:

(use-package "FFI")
(def-call-out messagebox
              (:name "MessageBoxA") (:library "user32.dll")
              (:arguments (hwnd int) (text c-string) (capt c-string) (type uint))
              (:return-type int)
              (:language :stdc))

(defun main()
  (messagebox 0 "Hello World!" "Message" 0)
  (quit))

then run:

clisp -M “C:\Program Files\clisp-2.47\base\lispinit.mem” -x “(load \”message.lisp\”)(ext:saveinitmem \”message\” :init-function #’main :executable t :norc t :quiet t)”helloworld

now we have a message.exe under the same directory, run it, you will get a standard Windows message box like this:

Almost all stuffs mentioned here are coming from:

http://www.frank-buss.de/lisp/clisp.html

except I added “:quiet t” to avoid CLisp’s welcome messages printed out in screen.

Jul 032009
 

While I was trying to dig out how to play with lisp, especially how to create an executable from it, I came across this message posted to c.l.l:

http://groups.google.com/group/comp.lang.lisp/msg/a8ffbb6d53f6b3db

pretty much what I want ๐Ÿ™‚ I’ve managed to created a executable on my Windows box and it runs just fine, well, with some tweaks, and actually a follow up describe the Windows dll problem:

http://groups.google.com/group/comp.lang.lisp/msg/71544781ad46b5c3