Re: [AD] Darwin/MacOS X port |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Seems fine.
Indeed... but it turns out I can't get it to work :-(
AL_FUNC(int, _main, (void *_mangled_main, int argc, char *argv[]));
#if (!defined ALLEGRO_NO_MAGIC_MAIN) && (!defined ALLEGRO_SRC)
#define main _mangled_main
#undef END_OF_MAIN
#define END_OF_MAIN() \
\
int main(int argc, char *argv[]) \
{ \
return _main((void *)_mangled_main, argc, argv); \
}
#endif
Both user's main() and our main() are replaced by _mangled_main() !
Do we hit a fondamental limitation of the C preprocessor, or is there a
trick to work around the problem ?
--
Eric Botcazou
ebotcazou@xxxxxxxxxx