delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/22/11:10:54

From: "Colin W. Glenn" <cwg01 AT gnofn DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Am I forgetting an include or something?
Date: Tue, 21 Jan 1997 21:59:08 -0600
Organization: Greater New Orleans Free-Net
Lines: 38
Message-ID: <Pine.GSO.3.95.970121215304.19563D-100000@sparkie.gnofn.org>
NNTP-Posting-Host: sparkie.gnofn.org
Mime-Version: 1.0
In-Reply-To: <Pine.SUN.3.91.970121091226.26269K-100000@is>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Tue, 21 Jan 1997, Eli Zaretskii wrote:
> On Sun, 19 Jan 1997, Colin W. Glenn wrote:
> > | redir -e %4.err gcc -o %4.exe -l -Wall -v %4.c
> 
> Why do you put -l there?  I think that is the source of your trouble.  
> Please remove it and try again, it should work.

Errr, I stuck that there because I was under the impression that it was a
switch to link, the readme1st used the syntax '-lm' for linking in the
math library, so I added that to link in the 'normal' library.  Anyway,
moot point, I thought of that already, and it still didn't do it.

> > Well after examining the structure in DIR.H, I of course looked in the 
> > LIBC.INF for the syntax of printf()ing a unsigned long and changed my 
> > printf() statement to this:
> > 
> > |     printf("%U %s\n", f.ff_fsize, f.ff_name);
> 
> No, that's incorrect (please read the library reference about format 
> specifiers).  The correct line should say this:
> 
>      printf("%lu %s\n", f.ff_fsize, f.ff_name);
> 
> (note that %U and %u are NOT the same!).

Errr, the libc.inf file at node printf:

* The conversion type specifier:

`c'	A single character
`d'	A signed integer
....
`u'	A unsigned integer
`U'	A unsigned long integer

But, I'll give your suggestion a try.


- Raw text -


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