www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/22/05:19:30

Date: Thu, 22 Apr 1999 12:17:27 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: CRETEL Dominique <dominique DOT cretel AT cfwb DOT be>
cc: djgpp AT delorie DOT com
Subject: Re: Help for Makefile
In-Reply-To: <371EE5F1.B590FB29@cfwb.be>
Message-ID: <Pine.SUN.3.91.990422121413.15748h-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 22 Apr 1999, CRETEL Dominique wrote:

> You can find this package at http://www.imatix.com/html/sfl/index.htm.
> If you prefer, but I don't think that it's a good idea, I can send you
> by e-mail the zip file of SFL packages :-o It take about 409 Ko :-(

There's no need; read on.

> D:\Sfl>make
> gcc -c sflbits.o  -s -O2 -Wall -pedantic sflbits.c
> gcc.exe: sflbits.o: No such file or directory (ENOENT)
> make.exe: *** [libsfl.a(sflbits.o)] Error 1

This is because you defined a wrong command in the rule:

%.o: %.c
        $(CC) -c $@ $(CPPFLAGS) $(CFLAGS) $<

$@ is the target, so it needs to be after the -o switch:

        $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<

See how simple this is?  Had you posted the error with the original
message, you could have the answer 4 days ago ;-).

- Raw text -


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