From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: undefined reference to `main'? Date: Wed, 12 Feb 1997 17:18:05 GMT Organization: Oxford University Lines: 18 Message-ID: <3301fa44.1970075@news.ox.ac.uk> References: <01bc189b$ae662ae0$8529cfa9 AT p590> NNTP-Posting-Host: mc31.merton.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On 12 Feb 1997 04:16:55 GMT, "Paul Hooper" wrote: >During linking I get the following error messages: > >crt0.s(.data+0x92): undefined reference to `main' >crt1.c(.text+0x303): undefined reference to `main' The problem here is likely to be that either you've mistyped the 'main' in the function definition, i.e. int mian(void) or something, or you've forgotten to link in the object file which contains this function. Check your link command (something like 'gcc -o .o .o ...') contains the object filename for the c file containing the main function. If it's already there, check that the c file really does contain the correct definition of main(). George Foot