compilers

Discussion in 'C++' started by emo, Dec 27, 2005.

  1. emo

    emo Guest

    How shall I use gcc 4.0 if I want to run just a simple 'Hello World'
    what I have to do ? Because I don't really know whether I have to make
    the same procedure as windows or not, so would be very thankful if
    anyone answer me that question :).
    emo, Dec 27, 2005
    #1
    1. Advertising

  2. emo wrote:
    > How shall I use gcc 4.0 if I want to run just a simple 'Hello World'
    > what I have to do ? Because I don't really know whether I have to make
    > the same procedure as windows or not, so would be very thankful if
    > anyone answer me that question :).


    news:gnu.g++.help
    Victor Bazarov, Dec 27, 2005
    #2
    1. Advertising

  3. emo

    Moonlit Guest

    in hello.cc

    #include <iostream>

    using namespace std;

    int main( int ArgC, char* ArgV[] )
    {
    cout << "Hello World" << endl;
    return 0;
    }


    g++ hello.cc -o hello

    ../hello


    --


    Regards, Ron AF Greve

    http://moonlit.xs4all.nl

    "emo" <> wrote in message
    news:...
    > How shall I use gcc 4.0 if I want to run just a simple 'Hello World'
    > what I have to do ? Because I don't really know whether I have to make
    > the same procedure as windows or not, so would be very thankful if
    > anyone answer me that question :).
    >
    Moonlit, Dec 28, 2005
    #3
  4. "Moonlit" <news moonlit xs4all nl> writes:

    > in hello.cc
    >
    > #include <iostream>
    >
    > using namespace std;
    >
    > int main( int ArgC, char* ArgV[] )
    > {
    > cout << "Hello World" << endl;
    > return 0;
    > }
    >
    >
    > g++ hello.cc -o hello


    Independently of which compiler I use I always make sure it compiles
    the correct language, and I also set the warning level to something
    reasonable. How to to this with gcc is off topic here though (but
    the command line flags -ansi, -pedantic, and -Wall are pretty useful).

    /Niklas Norrthon
    Niklas Norrthon, Dec 29, 2005
    #4
    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. Julian Hershel

    Command line compilers

    Julian Hershel, Apr 29, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    484
    Julian Hershel
    Apr 30, 2004
  2. Replies:
    0
    Views:
    532
  3. Comparing compilers

    , Dec 5, 2005, in forum: VHDL
    Replies:
    4
    Views:
    685
    Mike Treseler
    Dec 6, 2005
  4. embyembu

    i2c and compilers

    embyembu, Feb 22, 2006, in forum: VHDL
    Replies:
    0
    Views:
    492
    embyembu
    Feb 22, 2006
  5. geletine

    commercial c compilers vs free c compilers

    geletine, Jul 2, 2006, in forum: C Programming
    Replies:
    33
    Views:
    1,288
Loading...

Share This Page