cant compile on linux system.cant compile on cant compile onlinux system.

Discussion in 'C++' started by Nagaraj, Mar 1, 2007.

  1. Nagaraj

    Nagaraj Guest

    hi all,
    I have simple basic c++ program "hello world" which i cant compile on
    linux system. I have given extension as .C. please tell me how to
    compile C++ programs on Linux.
     
    Nagaraj, Mar 1, 2007
    #1
    1. Advertising

  2. Nagaraj

    Lionel B Guest

    Re: cant compile on linux system.cant compile on cant compileonlinux system.

    On Thu, 01 Mar 2007 03:09:38 -0800, Nagaraj wrote:

    > hi all,
    > I have simple basic c++ program "hello world" which i cant compile on
    > linux system. I have given extension as .C. please tell me how to
    > compile C++ programs on Linux.


    If your program file is helloworld.C (assuming you have the GNU
    compiler gcc installed, which you hopefully will) try:

    g++ helloworld.C -o helloworld

    then run the binary with:

    ../helloworld

    --
    Lionel B
     
    Lionel B, Mar 1, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. U. George
    Replies:
    4
    Views:
    851
    U. George
    Aug 11, 2005
  2. markus
    Replies:
    22
    Views:
    674
    Dances With Crows
    Sep 22, 2004
  3. DaveJ
    Replies:
    1
    Views:
    963
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    May 19, 2007
  4. fmbright
    Replies:
    8
    Views:
    218
  5. Krishna Chaitanya
    Replies:
    1
    Views:
    146
    Krishna Chaitanya
    Feb 27, 2009
Loading...

Share This Page