program arguments in module constructor?

Anders F Björklund afb at algonet.se
Fri May 19 12:51:45 PDT 2006


Johan Granberg wrote:

> Does not matter for all uses, in my case I needed it to "FIX" an ugly 
> main hack (SDLmain) in SDL for use in a library of mine.

Can't you just require the user to rewrite their main() ?

extern(C)
int SDL_main(int argc, char **argv)
{
	...
}

int main(char[][] args)
{
	return SDL_InitApplication(args);
}


That's what I did.
--anders



More information about the Digitalmars-d mailing list