Mail Archives: djgpp/1995/05/27/07:47:56
I'm a new user of djgpp C Compiler, and I,ve found some problems. I'm trying
to compile a project with the following makefile:
CC = gcc
CFLAGS = #-g
OFLAGS = -O2
LDFLAGS = -lm -lgrx
LDDIRS = -Ic:\c\djgpp\contrib\libgrx\include -Lc:\c\djgpp\contrib\libgrx\lib
proplot :proplot.o texto.o tabla.o comando.o objeto.o
$(CC) $(OFLAGS) -o proplot proplot.o texto.o tabla.o objeto.o \
comando.o $(LDDIRS) $(LDFLAGS)
proplot.o:proplot.c texto.h tabla.h comando.h
$(CC) $(OFLAGS) -c proplot.c $(CFLAGS)
texto.o:texto.c texto.h
$(CC) $(OFLAGS) -c texto.c $(CFLAGS)
tabla.o:tabla.c tabla.h
$(CC) $(OFLAGS) -c tabla.c $(CFLAGS)
objeto.o:objeto.c objeto.h
$(CC) $(OFLAGS) -c objeto.c $(CFLAGS)
comando.o:comando.c comando.h
$(CC) $(OFLAGS) -c comando.c $(CFLAGS)
Everything is Ok except the final step, when it tries to link with ld.
It gives this Output:
ld.exe: cannot open -lgrx: file not found
make.exe: *** [proplot] Error 1
Is there anybody who could tell me what is happening, please?
And anoter question about the makefile:
If I try to write several lines of instructions after a target like that:
proplot :proplot.o texto.o tabla.o comando.o objeto.o
$(CC) $(OFLAGS) -o proplot proplot.o texto.o tabla.o objeto.o \
comando.o $(LDDIRS) $(LDFLAGS)
coff2exe proplot
del proplot
the output is:
makefile:10: *** missing separator. Stop.
I'd be very thanked if anybody could help me.
Please send me your answer to my e-mail: jips AT sol DOT unizar DOT es
Thank you very much.
JIPS
- Raw text -