Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 C Problems on Ubuntu
Index -> Programming, C -> C Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Roman




PostPosted: Sun Jan 11, 2009 8:33 pm   Post subject: 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

code:

#include <stdio.h>

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
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Sun Jan 11, 2009 8:39 pm   Post subject: RE:C Problems on Ubuntu

Have you installed the build-essential package? Give that a whirl if the answer is no.
Roman




PostPosted: Sun Jan 11, 2009 10:23 pm   Post subject: 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




PostPosted: Sun Jan 11, 2009 10:32 pm   Post subject: Re: C Problems on Ubuntu

Since your using Ubuntu, open terminal and type this:

code:
sudo apt-get install build-essential
Roman




PostPosted: Tue Jan 13, 2009 7:13 am   Post subject: RE:C Problems on Ubuntu

Thanks a lot! Everything works now =]
Display posts from previous:   
   Index -> Programming, C -> C Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: