Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > compilers

Reply
Thread Tools

compilers

 
 
emo
Guest
Posts: n/a
 
      12-27-2005
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 .

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      12-27-2005
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


 
Reply With Quote
 
 
 
 
Moonlit
Guest
Posts: n/a
 
      12-28-2005
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: oups.com...
> 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 .
>



 
Reply With Quote
 
Niklas Norrthon
Guest
Posts: n/a
 
      12-29-2005
"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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
commercial c compilers vs free c compilers geletine C Programming 33 07-07-2006 05:21 AM
i2c and compilers embyembu VHDL 0 02-22-2006 02:52 PM
Comparing compilers erik.dellamonica@gmail.com VHDL 4 12-06-2005 02:49 PM
Job Posting: EDA Compilers, Santa Clara, CA, USA hr@tharas.com VHDL 0 04-06-2005 11:37 PM
Command line compilers Julian Hershel ASP .Net 2 04-30-2004 09:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57