-   Linux - Newbie (
-   -   Compiling on Ubuntu (

Susko80 04-10-2009 09:29 PM

Compiling on Ubuntu
I'm new with Linux and I tried the "Hello World!" program, but i cannot compile it. My friend tried explaining it to me over the phone but all i got was "G++ -o" and i dont know what goes after that and i dont even know if that is right.
My file looks like this.. but i dont know if this is relevant

// my first program in C++
#include <iostream>
using namespace std;
int main ()
cout <<"Hello World!";
return 0;

amani 04-10-2009 09:35 PM

One nice way of knowing the development tools is by reading the description in synaptic.

What are the c++ and c compilers called?

install kdevelop

AlucardZero 04-10-2009 10:19 PM

g++ file.c -o file.out

if you don't have g++/gcc/make/etc, install the build-essentials package via Synaptic

knudfl 04-11-2009 01:40 AM

  • sudo apt-get install build-essential
will provide 'gcc' and 'g++' and then some more, you need for compiling.
( Remember : only two s's in build-essential ! )

All times are GMT -5. The time now is 01:58 PM.