From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: New user: problem compiling Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <87nlaq$dlm$1 AT sunnews DOT cern DOT ch> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 38 X-Trace: /b4C/CfwIxkhM4R6lM27jJNtU++cBSfuDXnFj8o3kTQynOL7phskv6wrXbxa8YOFPqXTyk9oza1V!NyQGeOfOeXbIVJn6unbZYLEa4d+wneKNAkrXhFWOrqf7qPiRzB+s0b3j8RLXMv4zMmf3yKDitw== X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Tue, 08 Feb 2000 05:23:38 GMT Distribution: world Date: Tue, 08 Feb 2000 05:23:38 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On 7 Feb 2000 23:43:22 GMT, peliot AT axnd01 DOT cern DOT ch (Philip Eliot) wrote: >Hi, > I just installed DJGPP for the first time. After years of programming in UNix, this is my first foray into windows. Anyway, after installing I tried to compile hello, world as a test and got the following error message. I'm working in Windows NT 4.0. > >c:/djgpp/lib/crt0.o(.data+0xc2):crt0.s:undefined reference to 'main' >c:/djgpp/lib/libc.a(crt1.0).text+0x44e):crt1.c:undefined reference to 'main' >collect2:ld returned 1 exit status > >Any help is much appreciated. > Thanks, > Philip > try this: == start hello.c == #include int main(void) { puts("hello world. have you played your freepuzzlearena today?"); puts("http://fordms2.student.rose-hulman.edu/tetris/"); return 0; } == end hello.c == gcc hello.c -o hello.exe -- Damian Yerrick http://yerricde.tripod.com/ Comment on story ideas: http://home1.gte.net/frodo/quickjot.html AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/ View full sig: http://www.rose-hulman.edu/~yerricde/sig.html