I get the same problems when I try to compile any SDL projects. A default app generated from scratch works ok, but SDL seems to be a bit of a challenge to add into anything for Mac OS X + Lazarus. (Which is pretty much ALL my current projects.)