| Summary: | Wanted: ability to not include main() in libSDLiPhone.a | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Jack Jansen <Jack.Jansen> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | vitto.giova |
| Version: | HG 2.0 | ||
| Hardware: | iPhone/iPod touch | ||
| OS: | iOS (All) | ||
hey, does this http://hg.libsdl.org/SDL/rev/8a04b596b472 help you? It looks like you can disable the video driver (and main()) by turning off SDL_VIDEO_DRIVER_UIKIT in SDL_config_iphoneos.h I haven't tried it, so please let me know if there are any problems with this. |
We're using SDL only for audio on the iPhone, and the main() program in SDL_uikitappdelegate.m is conflicting with our own main program. But: some other routines from that file are needed, obviously. I tried disabling the main program by adding GCC_PREPROCESSOR_DEFINES=main=mainUNUSED to the xcodebuild command line for building libSDLiPhone.a, but unfortunately that doesn't work because the file starts with #ifdef main #undef main #endif Could I request that you add something like #ifndef WITHOUT_SDL_MAIN_PROGRAM or something like that around the main() program, or some other means whereby we can exclude the main program while keeping all the other goodies? Thanks, Jack