SDL

From Schmid.wiki
Jump to: navigation, search

Contents

Windows Installation

References

Prerequisites

MinGW

Installation

Download and unpack in c:\sdl.

Compile Test Example

cd /sdl/test
gcc -I/SDL/include -L/SDL/lib testbitmap.c -o testbitmap -lmingw32 -lSDLmain -lSDL -mwindows

The libraries must be linked in the correct order, otherwise you will get a complaint about an undefined reference to WinMain@16.

Ruby/SDL

Installation

Test Example

start irb, and type:

require 'sdl'
SDL.init(SDL::INIT_VIDEO)
s=SDL::setVideoMode(400,400,16,SDL::SWSURFACE)
s.drawAAFilledCircle(200,200,100,s.format.mapRGB(255,0,0))
s.flip
Personal tools