I'm working on some cross-platform code using OpenGL and SDL, but have immediately run into issues on Mac OSX.
For reference, here's the codebase on GitHub: https://github.com/GrooveStomp/platformer
I've also pushed the errors I'm seeing to that same repo: https://github.com/GrooveStomp/platformer/blob/master/errors.txt
Now, from the reading I've done, It seems as though SDL simply wraps around Mac OSX's Objective-C Cocoa layer and I need to declare my own NSAutoreleasePool to wrap my entire program. Is that correct?
I just came across this link: http://sourceforge.net/apps/wordpress/paintown/2010/12/26/sdl-and-osx/ in which the author installs from source and has no issues. I installed using Homebrew, which I assume is equivalent to the author's step #3, as I have to specify "-framework OpenGL" when building.
[EDIT]
So, it turns out that the NSAutoreleaseNoPool() issue should be taken care of by following these three steps:
- main() should have this signature: int main(int argc, char * argv[])
- #include <SDL.h> in the source file where main() is.
- link with -lSDLmain
The result is that SDL will wrap it's own main() with NSAutoreleasePool and all around my main. However, when I do this, I get the errors shown here:
https://github.com/GrooveStomp/platformer/blob/master/make_errors.txt