Hi Matthew,

A common approach is do include a main() with your library, with calls
after some sort of initialization another main, in this case your
XM_main().
Create some kind of  startup.c and a startup.h with the definition of
extern int XM_main(argc,argv...) in it.

Afaik this is done in MFC/Win32 (-> WinMain() ) or NutMain (on NutOs
<V3.0)

But what do you dislike in overriding with the help of the .init
segment?

Greetings
/Marc



> -----Original Message-----
> From: mspgcc-users-ad...@lists.sourceforge.net 
> [mailto:mspgcc-users-ad...@lists.sourceforge.net] On Behalf 
> Of matthew.c...@tekelek.com.au
> Sent: Wednesday, February 26, 2003 6:13 AM
> To: mspgcc-users@lists.sourceforge.net
> Subject: [Mspgcc-users] alternative main()
> 
> 
> Is there any way I can redefine the call to main() with 
> another function
> without over riding the startup proceedure ?   At the end of the
> application startup I would like to call my own function 
> XM_main() instead of main().  Is this possible, am I making sense ?
> 
> Cheers
> 
> Matthew
> Design Engineer
> ----------------------------------------------------------------------
> Tekelek Pty Ltd
> Australia
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Scholarships for Techies! 
> Can't afford IT training? All 2003 ictp students receive 
> scholarships. Get hands-on training in Microsoft, Cisco, Sun, 
> Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
> 


Reply via email to