www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/23/07:02:11

From: "A. Sinan Unur" <asu1 AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: *.C on Windows 95 (was: Stupid problem)
Date: Mon, 22 Sep 1997 02:35:22 -0400
Organization: Cornell University http://www.cornell.edu
Lines: 51
Sender: asu1 AT cornell DOT edu (Verified)
Message-ID: <342611AA.C1F03DBB@cornell.edu>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 970921132328 DOT 9556N-100000 AT is>
Reply-To: asu1 AT cornell DOT edu
NNTP-Posting-Host: cu-dialup-0074.cit.cornell.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli Zaretskii wrote:
> 
> On Tue, 16 Sep 1997, A. Sinan Unur wrote:
> > it
> > happened to me a couple of times. especially if you are as braindead 
> > as me and use batch files rather than makefiles and for get to turn 
> > on lfnfor ... yuck.
> 
> Please explain more.  What exactly did you put into those batch files
> and how did you try to compile the files when you got these problems?
> 
> And what is that ``lfnfor'' you are talking about?

lfnfor is a new system variable under win95 that makes for work using
long filenames rather than short ones. you can check its status by just
typing lfnfor at the command line. say you have a file prog.c and a
batch file

for %%f in (*.c) do gcc -c %%f

if lfnfor is off, running this batch file will result in:

D:\djgpp\C\TEST\b> type b.bat
for %%f in (*.c) do gcc -c %%f

D:\djgpp\C\TEST\b> b

D:\djgpp\C\TEST\b> for %f in (*.c) do gcc -c %f

D:\djgpp\C\TEST\b> gcc -c PROG.C

hence prog.c will be compiled as C++. you can verify this by adding the
-v parameter to the command line. OTOH:

D:\djgpp\C\TEST\b> lfnfor=on

D:\djgpp\C\TEST\b> b

D:\djgpp\C\TEST\b> for %f in (*.c) do gcc -c %f

D:\djgpp\C\TEST\b> gcc -c prog.c

compile prog.c as C.
-- 
----------------------------------------------------------------------
A. Sinan Unur
Department of Policy Analysis and Management, College of Human Ecology,
Cornell University, Ithaca, NY 14853, USA

mailto:sinan DOT unur AT cornell DOT edu
http://www.people.cornell.edu/pages/asu1/

- Raw text -


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