ubuntu compilation of c program

Asked by Avani Patel

I have been trying to compile a simple hello program using C in Ubuntu 11.10 ,but i am not able to compile . Can please somebody help me? I am very new to this environment.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gcc-defaults Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you install build-essential you wil get an ANSI standard C and C++ compiler.

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#2

http://www.wikihow.com/Compile-a-C/C%2B%2B-Program-in-Ubuntu

http://www.youtube.com/watch?v=tHT2nAE9dF0&feature=player_embedded#!

You can use the following source code (save file as hello.c) :

#include <stdio.h>

int main(void)
{
  printf("Hello world\n");
  return 0;
}

Revision history for this message
Enrico Rosina (e-rosina) said :
#3

Hello,

One more hint: At your place I would also consider installing an IDE.
I personally have NetBeans, and though I don't like too much their last strategic curve,
they have c/c++ imbedded. There is one NetBeans version in Ubuntu Software center,
and you can find two more recent versions of it at http://netbeans.org/

Hope this helps.
Enrico

Can you help with this problem?

Provide an answer of your own, or ask Avani Patel for more information if necessary.

To post a message you must log in.