I forgot what exactly was the cause/solution for this (having not used SDL for a loooooooooooong time), but it is a pretty well-known problem (or rather, feature). It has to do with the library's own main function and the defined preprocessor constants (which determine whether or not it implements one).
As far as I remember, there's just one preprocessor constant that you need to set, and it works fine. Look on the SDL site, there are a couple of similar issues and solutions to them.