[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiling gnu-gs-5.50 error in gp_unifs .. don't know
From: |
Wes Kaylor |
Subject: |
Re: compiling gnu-gs-5.50 error in gp_unifs .. don't know |
Date: |
Mon, 28 May 2001 02:09:03 -0400 |
User-agent: |
KNode/0.3.3 |
Mike Wünscher wrote:
> Hi all,
>
> I tried to compile gnu-gs-5.50 on a Suse Linux 6.4 with standard installed
> environment ( kernel 2.2.14, includes, libs ).
>
> I used the unchanged unix-gcc.mak as the Makefile and run make. I got this
> error below. I'm not a C-programmer, so I can't find the reason for this.
> Please give me a hint.
>
> gcc `cat
> /obj/cc.tr` -O2 -Wall -Wcast-align -Wstrict-prototypes -Wwrite-strings
> -fn
> o-common -I. -I./obj -o ./obj/gp_unifs.o -c ./gp_unifs.c
> /gp_unifs.c: In function `gp_enumerate_files_next':
> /gp_unifs.c:268: storage size of `stbuf' isn't known
> /gp_unifs.c:335: warning: implicit declaration of function `stat'
> /gp_unifs.c:336: `S_IFDIR' undeclared (first use in this function)
> /gp_unifs.c:336: (Each undeclared identifier is reported only once
> /gp_unifs.c:336: for each function it appears in.)
> /gp_unifs.c:268: warning: unused variable `stbuf'
> make: *** [obj/gp_unifs.o] Error 1
>
> Thanks for help
>
> Mike
>
>
>
>
Mike,
This is usually occures when the compiler comes across a variable
declaration that uses a data type that the compiler hasn't "seen" yet. In
this case, it appears that the compiler doesn't know what a "stat" type is,
so when it comes to a line that tries to create a variable of "stat" type,
like this:
struct stat stbuf;
it does know how to create the stbuf variable. If it didn't complain about
not being able to find a header file (which is where these data types are
usually defined), then it is possible that the header file that is
available doesn't have this definition in it.
Here is a recommended starting place for your search for an answer. Go to
a command line and type:
man stat
I think this relates to your problem. The stat() function is in the header
file /usr/include/sys/stat.h and this file pulls in
/usr/include/bits/stat.h, which is the file that has the "struct stat"
definition in it. You should check to see if you have these two files. If
you do, then you will have to figure out why the compiler doesn't see them.
Good luck,
Wes