This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Version
hehehehhehehe
Its works!
I use like you said $ /usr/local/bin/gcc -v
and show version 3.2.2
hehehehehe
I think when I install from source, it find the older gcc and update it
thanks a lot, now I understand! I have two versions installed of gcc
One its installed by Mandrake by a RPM, cauz with command
$ rpm -qi gcc
its show the version with came the Mandrake -> 3.2 and like you said its
has only C frontend cauz when I type
$ g++ -v
its show the version 3.2.2 it means that has no other compiler came
with gcc of Mandrake beyound C and I can desinstall easily, ins't?
and the other version is I installed from source and came with all
compilers
great! thanks a lot! now all its make sense!!!
now I'll organize all that, cauz I want to use only the gcc version
3.2.2
til next, good night
Sams
Em Seg, 2003-02-24 às 22:31, LLeweLLyn Reese escreveu:
> "Samuel T. Santos" <soujavatambem at uol dot com dot br> writes:
> [snip]
> > > What does /usr/local/bin/gcc -v show?
> >
> > the same above when you tell that gcc is 3.2 and -1 is mandrake package
> > version and so on...
>
>
> Are sure? (0) If so, I am confused - or you have 3.2 installed twice, in
> two different places, the second place conflicting with 3.2.2 -
> which is bad.
>
> Note:
> (0) Don't test this using
>
> $cd /usr/local/bin/
> $gcc -v
>
> because if . isn't the first thing in your path, you'll still be
> testing /usr/bin/gcc . Test with:
>
> $/usr/local/bin/gcc
>
> (Note: If you don't know, the initial $ represents your prompt;
> don't type it, type the remainder at your prompt.)
>
> > >
> > > Mandrake (and most other linux distros) slices and dices gcc into
> > > several packages. If you just hit the checkbox for gcc (on install),
> > > you don't get g++.
> > >
> >
> > but when I download 3.2.2 I downloaded all and compile...
> > then... gcc 3.2.2 for C its installed in differente place of the
> > mandrake version
>
> Yes. Mandrake installs its gcc in /usr (at least they
> always have in the past; I don't have 9.0, just 8.2)
>
> However the source tarball installs into /usr/local by default.
>
> > what is the gcc 3.2?
>
> I'm guessing the gcc 3.2 is the one that came with your linux distro
> (mandrake).
>
> >
> > > I suspect you have gcc 3.2.2 installed under /usr/local, with support
> > > for all languages, etc that are on by default, and gcc 3.2
> > > installed (by your linux distro) in /usr, with only the C
> > > frontend. Further, I guess /usr/bin comes before /usr/local/bin in
> > > your path. So typing 'gcc' results in /usr/bin/gcc, while 'g++'
> > > results in /usr/local/bin/g++, because you have no /usr/bin/g++.
> > >
> > > [snip]
> >
> > how I modify for that I hae just one compile, the new version?
>
> (a) Put /usr/local/bin first in your path. If your shell is bash, sh,
> or ksh:
>
> $export PATH=/usr/local/bin:$PATH
>
> does the trick. You might want it in your .bashrc if you use it
> all the time.
>
> This causes /usr/local/bin to be searched for commands before
> /usr/bin (or anything else). It's possilbe, but not common, to
> have other name-alike commands which occur in both /usr/bin and
> /usr/local/bin - note that these other commands will also be found
> in /usr/local/bin .
>
> (b) Just type out the full path of the compiler you want -
> /usr/local/bin/gcc, for example. With command line editing, I
> don't find this too onerous; I use it all the time.
>
> [snip]