Date: Thu, 3 Jul 1997 10:41:55 -0700 (PDT) Message-Id: <199707031741.KAA02439@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: humphrej AT kdn0 DOT attnet DOT or DOT jp From: Nate Eldredge Subject: Re: Error messages Cc: djgpp AT delorie DOT com Precedence: bulk You wrote >I have set the env variable with path=c:\djgpp\djgpp.env, That should be DJGPP=c:/djgpp/djgpp.env (note front slashes) and PATH=.....;c:\djgpp\bin;..... but since it seems to work I assume that's what you meant. > but whenever I >try to compile a program ex: gcc -o filename.c -lalleg. I get these two >errors > >c:/djgpp/lib\crt0.o(.data0x92):crt0.s: undefined referrence to 'main' >c:/djgpp/lib\libc.a(crt1.o)(.text+0x312):crt1.c:undefined referrence to >'main' > First question: What is the -o supposed to do? You have to use: gcc -o outputfile inputfile.c -lsomething Second question: Does your source file actually include a 'main' function? If not, and it's a single-source-file program, it needs to. If not, and it's a piece of a larger program, compile with -c and link afterwards. If so, I'm stumped :-). Try to remove as much as possible without making the problem go away. If it's still valid code, post it. Also try reading the GCC docs for more info on the command-line options. HTH Nate Eldredge eldredge AT ap DOT net