compile problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

I have just tried to compile a simple "Hello World" program in C, but it
failed to do so.
source code:
 #include <stdio.h>

int main()
{
	printk("Hello World!\n");
	getchar();
	return 0;
}

error message:
------@--------------:~/Programs/C$ gcc hello.c
hello.c:1:20: error: stdio.h: No such file or directory
hello.c: In function ‘main’:
hello.c:5: warning: incompatible implicit declaration of built-in
function ‘printf’


I then changed 'printf' to 'printk' in the source code and got this
error message only:
------@--------------:~/Programs/C$ gcc hello.c
hello.c:1:20: error: stdio.h: No such file or directory


I'm using a fresh install of Ubuntu Edgy Eft (6.10), and it has gcc 4.1
installed.

-chris



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux