c++ with linux

Gregory Nowak greg at romuald.net.eu.org
Tue Mar 30 18:16:12 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Like Saqib said, use g++ (note the 2 plus signs after the letter g) to
compile a c++ program. You invoke g++ as

g++ filename.cpp

where filename.cpp is the name of your file with your code. If you
don't give g++ the -o flag, it will by default place the compiled
binary in your current directory with the name a.out. You could then
run that program by typing:

./a.out

. If you want to have your program binary be called something other
then a.out, invoke g++ like:

g++ -o filename.bin filename.cpp

. This will compile filename.cpp, and call the resulting executable
filename.bin.

I do all of my c++ programming on my GNU/Linux boxes, so if you've got
more questions, and would like to take this off list, feel free to
drop me a line privately.

Greg


On Tue, Mar 30, 2004 at 02:55:54PM -0500, Kyrath. (AKA Rob) wrote:
> Hi,
> 
> If anyone is coding and compiling C++ programs on their linux box and is willing to answer some questions, and maybe even step me through a few things, I would appreciate it very much.  I also think it would be better to do this off list.
> 
> One of the reasons I decided to get involved with linux was to use it as a learning box for C++ programming.  Granted, trying to learn linux and C++ at the same time might be biting off a little too much too soon, but this is basically a hobby, so I can take my time with it.
> 
> Yesterday, I was just going through the "hello world" basics and found that I was unable to compile it at all.  If I can't get gcc to compile the simplest of programs to work, there's no use in pursuing it further.
> Either I'm missing something, perhaps libraries, or I really don't understand how to use gcc at all.  BTW, I found the manual for gcc extremely techy and not helpful, at least not at this early stage.
> 
> Thanks
> -- Rob
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

- -- 
Free domains: http://www.eu.org/ or mail dns-manager at EU.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAaf+87s9z/XlyUyARAlKxAKCJusvZuJCHYwbZFKLRAdrD0XQnuQCeL4mn
6KdbR/rj8VGkcgv254EM94k=
=CQjt
-----END PGP SIGNATURE-----




More information about the Speakup mailing list