|Re: [hatari-devel] Compiling with SDL2 without osx-bundle on OSX fails|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
Am Thu, 11 Sep 2014 21:20:07 -0500
schrieb Bob Carpenter <hatari@xxxxxxxxxx>:
> I tried your change this evening. The good news is that it now works
> when you compile Hatari without using an OS X bundle. The bad news is
> you now get the exact “Undefined symbol _main” error if you compile
> it as an OS X bundle. On the endif for ENABLE_SDL2, you spelled it as
> ENDABLE_SDL2. I have attached a diff file if you prefer that.
> However, even after fixing the typing error, I get an error that main
> is undefined. I am wondering if the add_definitions statement
> redefines both main functions (the one in main.c and SDLMain.m) as
> SDL_main. I could be completely wrong since I do not know anything
> about CMake other than cmake -G Xcode -DENABLE_SDL2=1. :) Your
> previous #define would only affect the main in main.c.
You're right by assuming that main now gets redefined everywhere ...
howver, in SDMain.m, there is the following sequence:
# undef main
That _should_ remove the definition in this file ... I wonder what's
going wrong here?
Could you maybe try to replace the "-Dmain=SDL_main" in CMakeLists.txt
with "-DSDL_MAIN_NEEDED=1" instead? Then the header SDL_main.h of the
libSDL should take care of the renaming... maybe that works better?
> I also wanted to give a short status report on the SDL2 port for OS
> X. The only remaining problem that Miguel and I have is the
> appearance of the Create New Floppy window when you enter fullscreen
> or do anything that affects the window (change monitor type, remove
> borders, etc.). We have confirmed your thought that the other
> problems were bugs in the OS X version of SDL 2.0.3.
Ok, thanks, good to know.