On 08/20/08 13:39, André Timpanaro wrote:
I tried to compile a C code for the first time in a Debian machine and
apparently gcc can't find the standard libraries.
For example, compiling
#include<stdio.h>
int main(){
printf("Hello World\n");
return 0;
}
gives the following errors:
hello.c:1:19: error: stdio.h: No such file or directory
hello.c: In function 'main':
hello.c:4: warning: incompatible implicit declaration of built-in
function 'printf'
AFAIK the standard libraries should be in /usr/include. A ls in this
directory returns
autosprintf.h gdict-1.0 gettext-po.h initreq.h python2.3 python2.4 X11
can somebody help me?
Do you have libc6-dev installed?
$ cat hello.c
#include<stdio.h>
int main()
{
printf("Hello World\n");
}
$
$ gcc hello.c
$
$ ./a.out
Hello World
$
--
Ron Johnson, Jr.
Jefferson LA USA
"Do not bite at the bait of pleasure till you know there is no
hook beneath it." -- Thomas Jefferson
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]