You typically need tools installed to build programs. Have you installed packages such as 'Development Tools', gcc, kernel-devel,kernel-headers, etc? Where did you get ns-allinone?

kingkoorosh

23rd November 2010, 07:52 AM

yes i install this packeges

JohnVV

23rd November 2010, 08:39 AM

it looks like the code is to old for the VERY new version of the gcc compiler ( gcc 4.5 )
you might need to install gcc 4.3 or gcc 4.1 alongside your current

to see what version you have installed run

gcc -v
the other versions are in the fedora repo

then you need to decide on just HOW you set the system to use them

the "alternatives" way
the set bash script way ( this is what i use to set [ gcc 3.4,4.1,4.3,4.5beta] on my system
or from the terminal at compile time ( dose not work well for BIG and complex programs)

ALSO as to what the forum administrator asked
WHERE did you get the program from ?
a prebuilt should?? be in the fedora reops
the std fedora repo or rpmfusion

kuh3h3

7th December 2010, 06:48 AM

there were many changes in gcc 4.5.
as error message says, remove ::GammaRandomVariable.
simple patch

instead of editing code for the VERY VERY VERY new gcc 4.5 ,not many programs will build with it yet .
Too many changes were added for even slightly older code to build
you could port the program to build with it , and - hopefully- there will not be much hacking not likely
or
install the bit older gcc 4.3 and/or gcc 4.1
they are in the fedora repo
-- but things like this ARE WHAT you get when you use a bloody cutting edge R&D distro like fedora .
the OS is SO NEW that the rest of the world has not caught up to it yet .

kuh3h3

7th December 2010, 01:53 PM

don`t worry about the error.
this error and fix is so common now.
Just New version of GCC ( 4.5 series) does not like the X::X() construct.
so simple solution is to change all X::X() construct to X() construct.
if you again meet another file with those errors during compile,
fix it in same way.

in a few posts above IT WAS STATED ( post 8) that for the VERY VERY VERY OLD ns2 to build using the current gcc 4.5 compiler that ns2 MUST BE EDITED( hacked/ ported) TO BUILD WITH IT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

build using gcc 3.4 or rewrite the code to build with gcc 4.5 -- see post 8 !!!!!!!!!!!!!