compilers

E

emo

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 :).
 
V

Victor Bazarov

emo said:
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
 
M

Moonlit

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
 
N

Niklas Norrthon

Moonlit said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top