X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2Fblog-0018.html-inc;h=84a740ff4f425ede40b97567d59b2b37c0970fbf;hb=807ae0cdf3bf7e415bbb01449976c9ab91209cbb;hp=464b6583b16a3e895757406ada41abb06276ab5c;hpb=638b5b9759c7dcb4de4c0a88c766e9f9dd650348;p=sdlgit%2FSDL-Site.git diff --git a/pages/blog-0018.html-inc b/pages/blog-0018.html-inc index 464b658..84a740f 100644 --- a/pages/blog-0018.html-inc +++ b/pages/blog-0018.html-inc @@ -1,6 +1,35 @@
This is the first time perldoc has disappointed me. The example on perlxs is wrong and fails. I do not wish to flame writers of perlxs but please check that your examples work! Ironically I know that broken tutorials is a problem with SDL perl too.
If anyone can point me to the simplest working exaple of XS with a c struct, it would be greatly appreciated.
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
+
To use this code you need the new Redesigned SDL_Perl Library
$ sudo apt-get install libsdl-net1.2-dev libsdl-mixer1.2-dev libsmpeg-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev
$ cpan Alien::SDL** Add sudo to this for Linux
$ cpan .** The dot is needed
$ perl examples/sols/ch02.pl+