Tuesday, November 23, 2010

How to setup Lispbuilder-SDL on Mac OS X


  1. Register as Apple Developer.
  2. Download an install the Xcode (it sets up the tool-chain).
  3. Install the Lispbuilder-SDL to ~/lib/lispbuilder-sdl/
  4. Download sources of SDL, unpack them to ~/lib/SDL-1.2.14 (number may vary as new SDL is available!)
  5. Build a SDL: in folder ~/lib/SDL-1.2.14 run ./configure then make then sudo make install
    All these steps are described in ~/lib/SDL-1.2.14/README.MacOSX
  6. Run make command in folder ~/lib/lispbuilder-sdl/cocoahelper to build the cocoahelper
  7. Run emacs, in buffer *slime-repl sbcl* execute:
    1. (require :cocoahelper)
    2. (require :lispbuilder-sdl)
That's all folks.

2 comments:

  1. I'm having a problem where when I try to run make in cocoahelper I get the following error:

    make -C glue
    g++ -dynamiclib -g -Wall -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/Library/Frameworks/SDL.framework/Headers -c -o lispbuilder-sdl-glue.o lispbuilder-sdl-glue.c
    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
    clang: warning: argument unused during compilation: '-dynamiclib'
    In file included from lispbuilder-sdl-glue.c:31:
    ./lispbuilder-sdl-glue.h:27:10: fatal error: 'SDL.h' file not found
    #include
    ^
    1 error generated.
    make[1]: *** [lispbuilder-sdl-glue.o] Error 1

    Any suggestions?

    ReplyDelete
  2. Well, from the warnings I see that SDL is for some reason not visible to the make (is it not installed with steps 4-5?).
    To check this I would try to build some SDL examples to check if SDL is available/accessible.

    ReplyDelete

My Blog List