delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/23/19:01:45

Date: Sat, 23 Jul 94 17:21:31 EDT
From: randy latimer <latimer AT pollux DOT cs DOT uga DOT edu>
To: djgpp AT sun DOT soe DOT clarkson DOT edu

I'm having a problem using make (DOS using djgpp) and was hoping that someone
could help.  I've tried reading the manuals and haven't found the answer yet.
Hope this is the right group to ask.

Anyway, I've got the following makefile:

PGM = tree
OBJS = main.o token.o table.o btree.o
CC = gcc
CCFLAGS = -g -Wall
CPPFLAGS =
LDFLAGS =
LDLIBS = -lgpp
.SUFFIXES: .cc
.cc.o:
	$(CC) $(CPPFLAGS) $(CCFLAGS) -c $<
all:    $(PGM)
$(PGM): $(OBJS)
	$(CC) -o $@ $(LDFLAGS) $(CCFLAGS) $(OBJS) $(LDLIBS)
btree.o : btree.cc btree.h 
main.o : main.cc boolean.h token.h table.h btree.h 
table.o : table.cc table.h boolean.h btree.h 
token.o : token.cc token.h boolean.h 

When I 'make', all .cc files compile and the final link step occurs which looks
like the following:

gcc -o tree  -g -Wall main.o token.o table.o btree.o -lgpp

However, this step causes a problem with a message like so:

d:/langs/djgpp/bin/ld.exe: Can't open gcc
\------------/
       ^ This is the base directory for djgpp.

Once it aborts, I can type the linking line in at command line and it will
link just fine.

I've experimented with a test set of files and come to the conclusion that
there can be no more than three .o files specified in the link command line.
Is this true?  What can I be doing wrong?  Is there an answer?

Thank you for your time.
Randy.
----------------------------------------------------------------------------
Randy Latimer                 | "A policeman is not there to create disorder,
latimer AT cs DOT uga DOT edu            |  a policeman is there to maintain disorder."
                              |        - Richard Daley


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019