Blog 2019/12/4
<- previous | index | next ->
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:
Further resources:
- Jiayu Yi's blog post about modifying
basics.scm
to use accelerated 2D rendering :) - Rastergraf's SDL drawing manual