delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/06/01/23:04:51

From: strags11 AT yahoo DOT com (Nick)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Simple (?) problem with djgpp/gcc/make
Date: 1 Jun 2003 17:51:53 -0700
Organization: http://groups.google.com/
Lines: 56
Message-ID: <1ba37fef.0306011651.4dfb06ed@posting.google.com>
References: <1ba37fef DOT 0306010650 DOT 10517f99 AT posting DOT google DOT com> <6137-Sun01Jun2003200228+0300-eliz AT elta DOT co DOT il>
NNTP-Posting-Host: 151.204.223.28
X-Trace: posting.google.com 1054515113 6814 127.0.0.1 (2 Jun 2003 00:51:53 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 2 Jun 2003 00:51:53 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Eli Zaretskii" <eliz AT elta DOT co DOT il> wrote in message news:<6137-Sun01Jun2003200228+0300-eliz AT elta DOT co DOT il>...
>>
>> I'm using the latest version of DJGPP, including gcc and make.  The
>> following, simple makefile doesn't work on my system (Windows XP). 
I
>> receive the same error every time:  "make.exe: *** [hello.o] Error
>> -1".
> 
> This usually mean that Make cannot find the GCC executable file,
> gcc.exe.

I am inclined to believe that this is the problem, too.  Even when
"gcc -v" is the first directive in my rule, the make fails with the
same error.  But, the DJGPP directory is first in my path string.  If
it's not finding the executable, then perhaps the spawned shell (if
there is one) is not reading this information correctly.

>> The gcc line works fine from my DOS command prompt if I type it in
>> directly.
> 
> Did you invoke Make from the same DOS box in which you tried the gcc
> command line?  In fact, it would help, I think, if you described
> precisely how did you invoke Make.

Yes, I invoked Make and gcc from the same command box.

I invoked Make using simply "make" and also "make hello.o", both from
my source directory.  My workspace directory is
\_ourstuff\Nick\workspace\Hello.  The makefile and my hello.c source
file are both in this directory.

Perhaps it has something to do with case-sensitivity, even though it's
DOS?  I modified the rule to as shown below.  Note the results.  The
first echo command executes just fine, "x" is printed as it should be.
 The second echo, in all caps, does not.  (Again, if I type "ECHO y"
at the command prompt, it works just fine.)  Finally, a simple "gcc
-v" fails completely, and the error terminates the makefile
processing.

Nick

----MAKEFILE------
hello.o : hello.c
        echo x
	ECHO y
	gcc -v
	echo z
	gcc -c hello.c
------------------

----RESULTS-------
echo x
x
ECHO y
make.exe: *** [hello.o] Error -1
------------------

- Raw text -


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