
-----------------------------------
Roman
Sun Jan 11, 2009 8:33 pm

C Problems on Ubuntu
-----------------------------------
Hey everyone.

I'm beginning to feel out C for this term's CS course. I'm using Ubuntu, installed on a virtual machine on my laptop. I wrote a simple hello world program and attempted to compile it. What I got was an error message saying that the stdio.h file could not be found. I looked around in the gcc folder and could not find it myself, either. I took the code to a Mac computer at school and it worked fine. Is something wrong with my compiler? Or did I do something improperly? The code is


#include 

int main(void)
{
    printf("Hello world! \n");
    return 0;
}


I'm confident there's nothing wrong in the program, and can't figure out what happened to the stdio file or where I can get another one.

Thanks in advance.
-RZ

-----------------------------------
wtd
Sun Jan 11, 2009 8:39 pm

RE:C Problems on Ubuntu
-----------------------------------
Have you installed the build-essential package?  Give that a whirl if the answer is no.

-----------------------------------
Roman
Sun Jan 11, 2009 10:23 pm

RE:C Problems on Ubuntu
-----------------------------------
Do I need to download it, or is there a command to install it? (there were commands for vim-related things, which is why I ask) I have no recollection of installing it, so the answer is probably no. Will do...

-----------------------------------
Vertico
Sun Jan 11, 2009 10:32 pm

Re: C Problems on Ubuntu
-----------------------------------
Since your using Ubuntu, open terminal and type this:

sudo apt-get install build-essential

-----------------------------------
Roman
Tue Jan 13, 2009 7:13 am

RE:C Problems on Ubuntu
-----------------------------------
Thanks a lot! Everything works now =]
