Skip to main content

What command to check gcc version

More
18 years 4 months ago #14323 by olaole
I need to install package that have some requirements:
- GCC 2.9.5
- libX11-dev , xlibs-dev are already installed.

I'd like to ask:
- How to check GCC version , if the version is not appropriate , how to uninstall it and how to install the new version.
-How to check wether libX11-dev, xlibs-dev.... already exist in the system. If no , where can I find the packages I need.
I'm using Fedora Core.

I'm new to Linux and very need to install this package (ns-2) to simulate for my thesis.
So it's very kind of you to help me as soon as possible.

:D :D :D
Thanks.
More
18 years 4 months ago #14324 by sujo
You can find the version number of gcc using the version option:

$ gcc --version

More details about the version can be found using -v:

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686/3.3.1/specs
Configured with: ../configure --prefix=/usr
Thread model: posix
gcc version 3.3.1
More
18 years 4 months ago #14330 by olaole
I've checked and the gcc version at my computer is gcc-3.3.2
So how to remove it and install the gcc-2.95
Hix....my package compile in gcc-3.3.2 makes error.
I need to install gcc-2.95 to compile again.
Please help!
More
18 years 4 months ago #14345 by olaole
Replied by olaole on topic gcc 2.95
I've try to downgrade gcc-3.3.2 to gcc-2.95 in my PC.
I try in Fedora Core 1 , RedHat8.0 , RedHat9.0. But it's fail
May be gcc 2.95 is no longer support in my distribution.
Anyone know what distribution support gcc-2.95. Please give me some information cause I need gcc-2.95 to install ns-2 package to simulate for my thesis.
Hope to hear from any of you soon.
Thanks.
More
18 years 4 months ago #14363 by nske
Hello,

Are you certain your application won't compile on gcc 3 or 4 ? Gcc 2.x is abandoned and so must be your application if it won't even compile in more recent versions!

Anyway, if gcc 2 is indeed necessary, try downloading some old version of any distribution (Redhat 7 or Slackware 8 should be ok). You can of course install gcc seperately (from source to avoid the RPM hell), however if you are new to linux and there is time pressure it would be simpler to just use an older distribution.

You can find mostly any version at ftp.ibiblio.org , let us know if you need help with anything in particular :)

[EDIT:] I just checked about the ns-2 program, it appears to be perfectly maintained so it should compile fine with gcc 3. Just follow the instructions provided here to install it from source.
More
18 years 4 months ago #14394 by olaole
Replied by olaole on topic Do you know about ns-2
1.Hic....it has been 9 days since I begin to install ns-2. I try different version with different OS ( 8.0 , 9.0, Fedora Core 1, 3).
Installing ns-2 like a.......... Mission impossible :( :(

I try ns-allinone-2.26 on Fedora Core 3.Here is the error:
[code:1]
p/ns-allinone-2.26/include -o Tcl.o Tcl.cc
In file included from tclcl.h:48,
from Tcl.cc:47:
tclcl-mappings.h: In static member function `static int TclObjectHelper<T>::disp atch_(void*, Tcl_Interp*, int, char**)':
tclcl-mappings.h:51: error: incomplete type `Tcl' used in nested name specifier
tclcl-mappings.h:52: error: invalid use of undefined type `struct Tcl'
tclcl-mappings.h:41: error: forward declaration of `struct Tcl'
tclcl-mappings.h:57: error: invalid use of undefined type `struct Tcl'
tclcl-mappings.h:41: error: forward declaration of `struct Tcl'
make: *** [Tcl.o] Error 1
tclcl-1.0b13 make failed! Exiting ...
[/code:1]
2.Because there is a mpls module not builtin ns-2. The owner of this module advices to compile it under gcc2.95. I try on RedHat9.0 ... it's fail.
3.Many other try to install other version but it's seems I should be calm more...fail...fail...fail.
4.How to uninstall older version in Linux. I always delete the folder but may be it's not right ???
4. Anybody have experience with ns-2. Please give me some advice and some information....I'm tired of...deadline comes near :lol: :lol: :cry: :cry: :cry:
Time to create page: 0.131 seconds