Author Topic: G++  (Read 14035 times)

0 Members and 5 Guests are viewing this topic.

Offline AntiVirus

  • Legendary
  • x86
  • Hero Member
  • *****
  • Posts: 2521
  • Best
    • View Profile
G++
« on: August 30, 2006, 04:23:52 pm »
Anyone know where I can find a download for this?  I have searched google and I haven't found any sites that have a download option, just an explination of what G++ is. :(

The once grove of splendor,
Aforetime crowned by lilac and lily,
Lay now forevermore slender;
And all winds that liven
Silhouette a lone existence;
A leafless oak grasping at eternity.


"They say that I must learn to kill before I can feel safe, but I rather kill myself then turn into their slave."
- The Rasmus

Offline Explicit

  • Hero Member
  • *****
  • Posts: 717
  • Hail Bender!
    • View Profile
Re: G++
« Reply #1 on: August 30, 2006, 04:25:22 pm »
Quote
Like all things in life, pumping is just a primitive, degenerate form of bending.

Quote
Hey, I don't tell you how to tell me what to do, so don't tell me how to do what you tell me to do! ... Bender knows when to use finesse.

[13:41:45]<@Fapiko> Why is TehUser asking for wang pictures?
[13:42:03]<@TehUser> I wasn't asking for wang pictures, I was looking at them.
[13:47:40]<@TehUser> Mine's fairly short.

Offline AntiVirus

  • Legendary
  • x86
  • Hero Member
  • *****
  • Posts: 2521
  • Best
    • View Profile
Re: G++
« Reply #2 on: August 30, 2006, 04:42:31 pm »
Hrmmm.. Now I feel dumb, but how do I open a .tar file?  And does G++ have an IDE version?  Does any of that make sense?

I feel so stupid. :(
The once grove of splendor,
Aforetime crowned by lilac and lily,
Lay now forevermore slender;
And all winds that liven
Silhouette a lone existence;
A leafless oak grasping at eternity.


"They say that I must learn to kill before I can feel safe, but I rather kill myself then turn into their slave."
- The Rasmus

Offline Ender

  • x86
  • Hero Member
  • *****
  • Posts: 2390
    • View Profile
Re: G++
« Reply #3 on: August 30, 2006, 05:08:49 pm »
GCC stands for the GNU Compiler Collection, and G++ is the GNU C++ compiler in that collection. Being a compiler collection, there are no IDEs that come with GCC, but IDEs can be used ontop of G++ just as they can be used ontop of any other compiler. I believe that the Dev-C++ IDE comes integrated with GCC.

If you're on Windows, there are many programs you can download that can unarchive tar files, but Windows doesn't come with any of them (eh, can't speak for vista). You can download the tar program for Windows, but from my experience it doesn't work very nicely on Windows (it doesn't have a few functionalities that it has on *nix). So if you're on Windows I would recommend 7-Zip. If you're on *nix, you already have it, so do: tar xvfz filename.tar.gz       or tar xvf filename.tar, the 'z' if it has gzip compression. Eh, and if you have Tiger, then... not sure if it comes with tar but give a whirl and there's definitely programs for untarring for Mac.

Also, if you're not on 'nix, be sure to download the pre-compiled package.

Don't feel stupid for asking questions. That attitude would destroy the purpose of a forum. There's nothing embarassing in learning. This response is long-winded but I hope it helps.
« Last Edit: August 30, 2006, 05:23:02 pm by Ender »

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: G++
« Reply #4 on: August 30, 2006, 05:13:52 pm »
To both of youze: it's gcc and g++, not capitalized.  "G++" confused me, but "g++" didn't, because the tools have lowercase names. 

If you're planning on using g++ from Windows, get Dev-c++ from http://www.bloodshed.net.  It's an IDE (other name for a GUI) that uses the Windows version of g++ and gcc to compile programs. 

But typically, gcc and g++ are command-line-based Unix/Linux compilers.  It's pretty rare to use them on Windows, except for educational purposes.

If you're on Linux and want to learn about .tar files, type "man tar" -- they give you examples at the top. 

If you're on Windows and want to play with tar files, you can use WinRAR.  But typically, tar files are intended for Linux. 

Offline Ender

  • x86
  • Hero Member
  • *****
  • Posts: 2390
    • View Profile
Re: G++
« Reply #5 on: August 30, 2006, 05:18:26 pm »
To both of youze: it's gcc and g++, not capitalized.  "G++" confused me, but "g++" didn't, because the tools have lowercase names. 
Well, that's just because Linux is base 39. Wikipedia capitalizes it =p. And we all know Wikipedia is always correct.
http://en.wikipedia.org/wiki/GNU_Compiler_Collection

Now begins the English vs. 'nix flamewars.


« Last Edit: August 30, 2006, 05:22:29 pm by Ender »

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: G++
« Reply #6 on: August 30, 2006, 05:33:40 pm »
Yeah, that's totally wrong. :P

Offline AntiVirus

  • Legendary
  • x86
  • Hero Member
  • *****
  • Posts: 2521
  • Best
    • View Profile
Re: G++
« Reply #7 on: August 30, 2006, 06:24:16 pm »
Thank you guys for your help.  And thanks Ender for making me feel less stupid. :P

I will download that Dev IDE.  I was just getting sick of having to telnet to our UNIX server for typing in a program and then having to use this hugemongus command to compile it.  It was getting on my nerves and I like having an IDE better. 

Thanks again guys. ^^

P.S.

Sorry about the caps thing.  Of course Ron would get "confused" by such a simple mistake. :P
The once grove of splendor,
Aforetime crowned by lilac and lily,
Lay now forevermore slender;
And all winds that liven
Silhouette a lone existence;
A leafless oak grasping at eternity.


"They say that I must learn to kill before I can feel safe, but I rather kill myself then turn into their slave."
- The Rasmus

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: G++
« Reply #8 on: August 30, 2006, 06:50:23 pm »
Thank you guys for your help.  And thanks Ender for making me feel less stupid. :P

I will download that Dev IDE.  I was just getting sick of having to telnet to our UNIX server for typing in a program and then having to use this hugemongus command to compile it.  It was getting on my nerves and I like having an IDE better. 

Thanks again guys. ^^

P.S.

Sorry about the caps thing.  Of course Ron would get "confused" by such a simple mistake. :P

Hugemongus?  If you have a program called "myprogram.c", you type "gcc myprogram.c".  That's not hard!  Everything else (like -o) is gravy. 

My favorite way of that solving the problem was installing Linux on my laptop.  But that's just me :P

Offline AntiVirus

  • Legendary
  • x86
  • Hero Member
  • *****
  • Posts: 2521
  • Best
    • View Profile
Re: G++
« Reply #9 on: August 30, 2006, 07:05:29 pm »
I have to do it this certain way.  And the command is not that simple..

It's: g++ -W -Wall -s -pedantic-errors name.cpp -o name

Then after that to actually get my file to run, I have to type:
./name

I find that a tad bit annoying.  I rather debug my program using an IDE then messing with a dos screen.  :P

And yes, hugemongus.  It's a word that I use all the time to exaggerate how big something is. :P

And yeah, my Dad told me I should use VMWare instead of dual booting my laptop. But, I don't know.  I want both Windows and a linux based operating system on my computer. 
« Last Edit: August 30, 2006, 07:07:09 pm by AntiVirus »
The once grove of splendor,
Aforetime crowned by lilac and lily,
Lay now forevermore slender;
And all winds that liven
Silhouette a lone existence;
A leafless oak grasping at eternity.


"They say that I must learn to kill before I can feel safe, but I rather kill myself then turn into their slave."
- The Rasmus

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: G++
« Reply #10 on: August 30, 2006, 07:25:29 pm »
I wouldn't use VMware unless your computer can handle another OS running inside of it...

And that command is rather easy, btw. Look at some of the commands in Makefiles. Look how hard that'd be!

You should write a Makefile for your projects. :)
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: G++
« Reply #11 on: August 30, 2006, 08:31:35 pm »
It's: g++ -W -Wall -s -pedantic-errors name.cpp -o name

I think that -Wall is a superset of -W, I think. 

-s is useless.  Actually, -s is bad -- it strips debugging information

I think -pedantic-errors is a bad thing, it lets you use functions that you shouldn't use, I think?  That doesn't seem right, but that's the impression I get from the man-page....

And you don't need -o, if you leave off -o it calls the output file "a.out". 


But using all those doesn't hurt.  However, Newby's right, a Makefile would make your life far easier. 

Offline AntiVirus

  • Legendary
  • x86
  • Hero Member
  • *****
  • Posts: 2521
  • Best
    • View Profile
Re: G++
« Reply #12 on: August 30, 2006, 09:52:13 pm »
Lmao.  I don't know how to make a makefile.  And besides, I am just doing what my teacher tells me to do. :P
The once grove of splendor,
Aforetime crowned by lilac and lily,
Lay now forevermore slender;
And all winds that liven
Silhouette a lone existence;
A leafless oak grasping at eternity.


"They say that I must learn to kill before I can feel safe, but I rather kill myself then turn into their slave."
- The Rasmus

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: G++
« Reply #13 on: August 31, 2006, 12:13:58 am »
Your teacher should *teach* you how to install this stuff. :)
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: G++
« Reply #14 on: August 31, 2006, 10:33:06 am »
Not really.  Usually teachers have machines setup with all this stuff ahead of time.  Sounds like AV is doing this at home.