Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis
Last active December 6, 2019 07:04
Show Gist options
  • Save cellularmitosis/9c0efae54949604e34ba4536b5adf7bc to your computer and use it in GitHub Desktop.
Save cellularmitosis/9c0efae54949604e34ba4536b5adf7bc to your computer and use it in GitHub Desktop.
Getting started with SDL and Chicken Scheme

Blog 2019/12/4

<- previous | index | next ->

Getting started with SDL and Chicken Scheme

Install chicken:

  • Mac: brew install chicken
  • Debian: apt-get install chicken-bin

Install the sdl2 egg: chicken-install sdl2

I ran into an error:

$ chicken-install sdl2
building miscmacros
   /usr/local/Cellar/chicken/5.1.0/bin/csc -host -D compiling-extension -J -s -regenerate-import-libraries -setup-mode -I /Users/cell/.cache/chicken-install/miscmacros -C -I/Users/cell/.cache/chicken-install/miscmacros -O2 -d1 miscmacros.scm -o /Users/cell/.cache/chicken-install/miscmacros/miscmacros.so
install_name_tool: object: /Users/cell/.cache/chicken-install/miscmacros/miscmacros.so malformed object (unknown load command 7)

Error: shell command terminated with non-zero exit status 256: install_name_tool -change libchicken.dylib '/usr/local/Cellar/chicken/5.1.0/lib/libchicken.dylib' '/Users/cell/.cache/chicken-install/miscmacros/miscmacros.so'

Error: shell command terminated with nonzero exit code
256
"sh /Users/cell/.cache/chicken-install/miscmacros/miscmacros.build.sh"

Looks like I have two versions of install_name_tool installed:

$ type -a install_name_tool
install_name_tool is /opt/local/bin/install_name_tool
install_name_tool is /usr/bin/install_name_tool

Renaming the version in /opt seemed to do to trick:

$ cd /opt/local/bin
$ sudo mv install_name_tool install_name_tool.disabled

Grab the basics.scm demo and try it out:

$ wget 'https://gitlab.com/chicken-sdl2/chicken-sdl2/raw/master/demos/basics.scm'
$ csi basics.csm

Use the arrow keys to move the smiley and the space bar to randomize their color:

Dec-04-2019 17-55-34

Further resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment