[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] can't find stdio.h



I am trying to do an out-of-tree compile of a hello
world application for ucLinux.  I have downloaded the
tools, dist project, and kernel project and set them
up as shown on the website.  (I also applied the
latest patch but I am not sure how well it worked.) 
Wrote my hello world app. (shown below) and borrowed
the make file off the website for doing an out of tree
appilcation.  (I don't believe that I modified the
makefile since it did not look like I needed to.)
Anyway, when I do a 'make clean' and make I get the
following:


[john@248-COEN--876-691 hello_app]$ make
mb-gcc  -c -Os -g -fomit-frame-pointer -fno-common
-Wall   -mxl-soft-mul -mxl-soft-div -Dlinux
-D__linux__ -Dunix -D__uClinux__ -DEMBED -nostdinc
-I../uClinux-dist/include
-I../uClinux-dist/include/include -fno-builtin -o
hello.o hello.c
hello.c:1: stdio.h: No such file or directory
make: *** [hello.o] Error 1

My best guess is that the configuration
file(s)/settings that shows the compiler where to find
stdio.h is not right so that  it cannot find the
directory where it is.  I am not sure what config
file/setting I need to change to fix it.  I have run
'make menuconfig' numerous times enabling anything
that looks like it might have anything to do stdio.h
but have found nothing that would fix it yet.  Anyway,
I am including a copy of my hello world application
and makefile below if needed.  They are located in a
directory next to my uClinux-dist directory.  If it is
helpful to know I am using Fedora Core 3.

My program:

#include <stdio.h>

int main(void){the
  	printf("Hello World!");
	return 0;the
}

My makefile:
I am trying to do an out-of-tree compile of a hello
world application for ucLinux.  I have downloaded the
tools, dist project, and kernel project and set them
up as shown on the website.  (I also applied the
latest patch but I am not sure how well it worked.) 
Wrote my hello world app. (shown below) and borrowed
the make file off the website for doing an out of tree
appilcation.  (I don't believe that I modified the
makefile since it did not look like I needed to.)
Anyway, when I do a 'make clean' and make I get the
following:


[john@248-COEN--876-691 hello_app]$ make
mb-gcc  -c -Os -g -fomit-frame-pointer -fno-common
-Wall   -mxl-soft-mul -mxl-soft-div -Dlinux
-D__linux__ -Dunix -D__uClinux__ -DEMBED -nostdinc
-I../uClinux-dist/include
-I../uClinux-dist/include/include -fno-builtin -o
hello.o hello.c
hello.c:1: stdio.h: No such file or directory
make: *** [hello.o] Error 1

My best guess is that the configuration
file(s)/settings that shows the compiler where to find
stdio.h is not right so that  it cannot find the
directory where it is.  I am not sure what config
file/setting I need to change to fix it.  I have run
'make menuconfig' numerous times enabling anything
that looks like it might have anything to do stdio.h
but have found nothing that would fix it yet.  Anyway,
I am including a copy of my hello world application
and makefile below if needed.  They are located in a
directory next to my uClinux-dist directory.  If it is
helpful to know I am using Fedora Core 3.

My program:

#include <stdio.h>

int main(void){the
  	printf("Hello World!");
	return 0;the
}

My makefile:


ROOTDIR=../uClinux-dist
the

UCLINUX_BUILD_USER = 1
include $(ROOTDIR)/.config
LIBCDIR = $(CONFIG_LIBCDIR)
include $(ROOTDIR)/config.arch

HELLO = hello
HELLO_OBJS = hello.o

all: $(HELLO)

$(HELLO): $(HELLO_OBJS)
	$(CC) $(LDFLAGS) -o $@ $(HELLO_OBJS) $(LDLIBS)

clean:
	-rm -f $(HELLO) *.elf *.gdb *.o

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

Thanks for your help once again!

John Prestwich

ROOTDIR=../uClinux-dist
the

UCLINUX_BUILD_USER = 1
include $(ROOTDIR)/.config
LIBCDIR = $(CONFIG_LIBCDIR)
include $(ROOTDIR)/config.arch

HELLO = hello
HELLO_OBJS = hello.o

all: $(HELLO)

$(HELLO): $(HELLO_OBJS)
	$(CC) $(LDFLAGS) -o $@ $(HELLO_OBJS) $(LDLIBS)

clean:
	-rm -f $(HELLO) *.elf *.gdb *.o

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

Thanks for your help once again!

John Prestwich


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/