PDA

View Full Version : Installing gcc-4.0 on Ubuntu 6.0.6



reghuram
November 3rd, 2006, 11:44 AM
Hello,

I just installed gcc-4.0 using Synaptic. However when I typed gcc, it could not find the command. So I created a sym link in /usr/bin to point to gcc-4.0.

In my home dir I created the file helloworld.c . Code as follows:
#include <stdio.h>

int main()
{
printf("Hello World. \n");
return 0;
}

I compiled this file using the command: gcc helloworld.c
The compiler gave me an error saying that it couldn't find "stdio.h". I checked in the /usr/include dir and I couldn't find any of the standard c header files.

Could someone please tell me where I went wrong?

Thank you.

loell
November 3rd, 2006, 11:54 AM
perhaps do

sudo aptitude install build-essential

;)

drunkenrobot
November 3rd, 2006, 08:18 PM
thank you thank you thank you thank you thank you thank you

reghuram
November 7th, 2006, 04:42 AM
Thank you. :D