views:

28

answers:

0

How can I call SDL functions from C++ in OS X without a main method? I'm building a dynamic library that does the initialization. The application that calls it depends only on the library.

I realize that I need to somehow create an autorelease pool in Objective-C, because SDL_Init() crashes as it's now, but I don't know how. SDLmain creates it automatically, but as I said, I don't use it because my application is not linked with SDL, only my library is.

edit: I got it working by linking the application with SDL, but the solution is not exactly what I wanted, because I don't want my application to depend on anything else but my library.