URGENT: stat (libstat.a)?
Hi all,
I'm facing this error in every program that tries to access the system function stat. If I write a simple C program like this:
int main () {
struct stat *a;
(void) stat ("abc",a);
printf ("Hello\n");
}
and compile it using gcc (v2.96) then the program compiles and runs, however, if I compile it in the following way:
gcc -c 1.c
ld -lc 1.o
then I get "1.o(.text+0x12): undefined reference to `stat'"
I can't seem to find the library containing this function. I'm getting the same problems whenever I used a third party tool that accesses the stat function.
Any clues?
PS. I'm on RHL 7.3
Thank you very much!
RH
|