add/remove software

Erik Schmidt eschmidt90 at gmail.com
Sun Jan 21 16:34:13 UTC 2007


when I type "locate 'stdio.h'", it gives me the location of the file
nostdio.h and its in a perl folder

On Sun, 2007-01-21 at 16:03 +0000, Andy wrote:
> On 21/01/07, Erik Schmidt <eschmidt90 at gmail.com> wrote:
> > I succesfully installed libdb2-dev, however, test.c still refuses to
> > compile, and due to the same errors: stdio.h is not found
> Is there a file called stdio.h on your system?
> 
> try typing:
> sudo updatedb
> 
> and then:
> locate 'stdio.h'
> if that doesn't display anything type:
> sudo locate 'stdio.h'
> 
> On my machine locate identifies the following:
> /usr/include/bits/stdio.h
> /usr/include/stdio.h
> (the full output is longer)
> 
> Make sure your #include line is correct.
> delete the line and type it again.
> note that it is #include not #import as someone said earlier.
> make sure you use <stdio.h> and NOT "stdio.h", they are not the same thing.
> 
> 
> The following works for me:
> create file hello.c with the following text:
> 
> 
> #include <stdio.h>
> 
> int main(int argc, char** argv)
> {
>   printf("Hello World!\n");
>   return 0;
> }
> 
> 
> 
> then just run gcc to compile, and run program:
> $ gcc -Wall -o hello hello.c
> $ ./hello
> Hello World!
> $
> 
> also works with cc.
> 
> Just a quick check can you type:
> 
> cc --version
> 
> _ Andy
> 





More information about the ubuntu-users mailing list