Mail Archives: djgpp/1997/07/03/13:49:01
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
- Raw text -