Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm Sender: cygwin-owner@sourceware.cygnus.com Delivered-To: mailing list cygwin@sourceware.cygnus.com Message-Id: <199907062223.RAA00541@mercury.xraylith.wisc.edu> To: John Garrison cc: cygwin@sourceware.cygnus.com Subject: Re: Libraries not working In-Reply-To: Your message of "Tue, 06 Jul 1999 18:03:07 EDT." <37827D1B.A4360E0E@visi.net> Date: Tue, 06 Jul 1999 17:23:48 -0500 From: Mumit Khan John Garrison writes: > > Now if I could just find out how to make WinMain be declared without > breaking compatibility with other platforms. Can I just do somthing like > the following? > > WinMain(void) > { > main(); > } > You shouldn't need to do anything at all. If this is a windows32 GUI program, add -mwindows when linking the program; if this is a console mode (the usual Unix kind), then the linker should pick up main from one of the object files where main is defined. If it is console mode, then is main() defined in one of the object modules? $ i586-mingw32-nm --print-file-name *.o | grep main do you see a defined symbol for main (there is a ' T ' before the symbol name if defined). If main() is in an archive instead, try the following: $ i586-mingw32-gcc -o foo -Wl,-u,_main [rest of arguments] and see if that helps. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com