If you have this fantastic book from John R. Hall/Loki (Pub: NoStarch, ISBN 1-886411-492), you will have no doubt have downloaded the source code from NoStarch's website.
Unfortunately, for a modern distro, the code will just not compile out of the box.
I've now gone through all of the code and fixed it so that you can just dearchive out of the box and make the examples (except for the Chapter 4 SDL examples - I must have forgotten to put them in!).
It will now work out of the box with libsndfile, OpenAL and SDL with quite a number of corrections to the code and makefiles. All of the code is licenced under the GPL.
I have offered the updated code to NoStarch, but as yet have not had a reply. Should they reply and ask for the code to be removed, it of course shall.
If you don't have the book, shame on you! Go out and buy it, then download the amended source code.
http://www.all-the-johnsons.co.uk/linux/plg.html

Yeah, but I generally get a lot more from the code than the text in these sorts of books. Seeing examples and tearing them to pieces making something new is my favorite way of figuring out how to code new things. The examples failing made the book a lot less useful to me, I read the text but didn't have working code to put it with. So, thank you for your work, it has improved the usefulness of this book immensly for me.
Another thing, you use absolute symbolic links in the package, this makes it necessary to relink all the media files when you unpack the tarball. It would be much more convienient if you used relative symbolic links.
I'm playing with some network code to enable Scribus (http://www.scribus.net) to be able to have multiple people to be able to edit the same document, so it may be Monday...
I'm now uploading the fixes to the archive - should be done in the next 10 mins.
Changes :
- Makefiles added to the SDL directory
- Symlinks fixed
- Slight bug fix to the final application (hardly anything really!)
Available NOW!"Required quite a few changes." And people wonder why there are so few good games for GNU/Linux. I'm a programmer with too much time on my hands, so I can live with the whole "libsomething 1.1.2 breaks compatibility with libsomething 1.1.1." People that do this for a living, being able to choose between Windows and GNU/Linux, would be out of their minds to support GNU/Linux in it's current state.
Now, I'm not sure how old the book is... And if it was made for RedHat 4.0, then I can understand. But fact is, compatability is very fragile in GNU/Linux land.
The problem you mentioned is not specific linux. API's changing over the years can affect programs written in any language for any operating system. The SDL code in the book is over 3 years old. SDL has changed a lot since then.
If you are publishing a game in binary only format, it may be wise to include the third party libraries with it. Many of the commercial linux ports of game do just this. Take a look where it installed. If it is using SDL, there's likely and sdl.so file in the game's directory. That compiled version of the library won't change.
This is why I decided to remove the binaries from the source releases - as it stands, I run Fedora Core 3 test 1 which means that libraries change frequently, but if you're using (say) RedHat 8, the version of the SDL dynamic libs are more than likely not going to be the same as the version I run
Personally, I take it as great testament to the speed of development of GNU/Linux that to keep things going, it's better to release source than binaries, but also that even though the code in PLG is 3 years old, with the exception of the network and sound code, the rest compiled and a perfectly playable game was available
For those interested, the Linux Game Programming code fixes and errata lists are coming along slowly as there are sooooo many problems with it! Don't expect anything soon!
If you don't get a reply from No Starch, let me know and I'll make sure the new archive makes it to their website.
-John Hall
author, Programming Linux Games
overcode at overcode dot net