[uClibc]FOLLOWUP: missing stdarg.h stddef.h, etc.

Todd Sundsted toddx503 at yahoo.com
Sat Oct 5 12:55:31 UTC 2002


Erik,

Thanks for the reply.

I wrote a small program:

  #include <stdarg.h>

  int
  main(int argc, char **argv) {
  }

Results:

  gcc -o main main.c -- *works*
  gcc -nostdinc -I/usr/include \
    -I/usr/lib/gcc-lib/i386-redhat-linux/2.96/include \
    -o main main.c -- *also works*

However,

  gcc -nostdinc -I/usr/include -iwithprefix include -o main main.c

gives the following error:

  main.c:1:20: stdarg.h: No such file or directory

My compiler is:

  $ gcc -v
  Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
  gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-112)

I am using an out-of-the-box install of Redhat 7.3.

Thanks,
Todd

--- Erik Andersen <andersen at codepoet.org> wrote:
> On Fri Oct 04, 2002 at 06:15:30AM -0700, Todd Sundsted wrote:
> > This is a followup to my last post.  I appears that in uClibc v 0.9.11
> there
> > was a line like:
> > 
> > GCCINCDIR = ${shell $(CC) -print-search-dirs | sed -ne "s/install:
> > \(.*\)/\1include/gp"}
> > 
> > in the Rules.mak.  This line located the compiler specific include files
> > (in /usr/lib/gcc-lib/i386-redhat-linux/2.96/include on my box, for example)
> > and added them to the CFLAGS:
> > 
> > CFLAGS=$(WARNINGS) $(OPTIMIZATION) -fno-builtin -nostdinc $(CPUFLAGS)
> > -nostdinc -I$(TOPDIR)include -I$(GCCINCDIR) -I. -D_LIBC $(ARCH_CFLAGS)
> > 
> > In later versions, this disappeared.
> 
> The idea here is to allow gcc to include the gcc include files.
> In newer versions of uClibc this expression has been replaced
> with "-iwithprefix include" in CFLAGS, which should do exactly
> the same thing, and eliminates the need for calling the shell and
> sed.  What compiler are you using?  Can you check that "-nostdinc
> -iwithprefix include" works as expected?
> 
>  -Erik
> 
> --
> Erik B. Andersen             http://codepoet-consulting.com/
> --This message was written using 73% post-consumer electrons--


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com



More information about the uClibc mailing list