add/remove software
Andy
stude.list at googlemail.com
Sun Jan 21 16:03:18 UTC 2007
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