Cool, I finally got it to compile and stuff. Sure did take a long time to compile, at least 45min. So I added /usr/local/gcc322/bin to the profile file like so: PATH=$PATH:"/usr/local/gcc322/bin" but when I type g++ -v I still get 3.2. In order for me to use 3.2.2 i have to type /usr/local/gcc322/bin/g++ -o foo bar.cpp. I guess I have to make a script or something like Julien said, the bad thing is I don’t know how.
The bad thing is that my program just like that sample one posted above doesnt work right even with 3.2.2 for me. I made a file called foo and put a 5 in it. Made a file called bar and put a 10 in it. When I run that program above I get:
5
5
I checked for f.fail() but it didn’t seem to fail since my cout never executed saying “error opening bar.” This is so strange.
Thanks for all the help so far though.
-SirKnight
[This message has been edited by SirKnight (edited 02-25-2003).]
Then explicitly call gcc322 when you want to use your newly compiled compiler.
Linux is just a kernel. RedHat Linux is an operating system coming with a Linux Kernel and a whole bunch of GNU packages. Gentoo Linux (my current OS) is a different operating system, as well as are Debian Linux, etc.
>>>Sure did take a long time to compile, at least 45min.<<<
Compile what? gcc?
I had RH8 installed on another disk and it had a package called KDevelop. Nice looking and everything but I wasn’t able to compile anything, GL and non GL.
I usually use KDevelop to write the code but I use the console to compile. Right now i’m only using linux for my Data Structures class and we have to use the console to compile cuz he wants to see that we understand both the compile and linking stage. :-/ We have to use script to capture everything so that way he can see it compiled and too see the output.
The trick for me now is to get KDevelop to run my new g++ instead of the old version. I havn’t yet found the spot to tell it where the new g++ exe is located.