Installing the ns-2.33 in Ubuntu11.04 has never encountered this error before installing the Ubuntu-10.10 in the ns-2.33, and then upgrading the Ubuntu version will see the following error. Refer to the solution on the following website:
InUbuntu 11.04InstallNs-2.33, Previously inUbuntu-10.10InstallNs-2.33I have never encountered such an error. I upgraded it later.Ubuntu.
You can refer to the solution on the following website:
Http://www.linuxidc.com/Linux/2011-06/36779p3.htm
1. Error 1: InstallationNS2.33The following error occurs:
Tools/ranvar. cc: In member function 'virtual double GammaRandomVariable: value ()':
Tools/ranvar. cc: 219: 70: error: cannot call constructor 'GammaRandomVariable: GammaRandomVariable' directly
Tools/ranvar. cc: 219: 70: error:For a function-style cast, remove the redundant ': GammaRandomVariable'
Make: *** [tools/ranvar. o]Error1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
This is becauseGccThe version is upgraded to simplify the calling of internal functions of the class, resulting in incompatibility. The solution is as follows:
InNs-allinone-2.33/ns-2.33/toolsFolder, findRanvar. ccFile, open it and find the corresponding219Delete row: GaammaRandomVariable, Save,
That is219Row
Return GammaRandomVariable: GammaRandomVariable (1.0 + alpha _, beta _). value () * pow (u, 1.0/alpha _);
Changed:
Return GammaRandomVariable (1.0 + alpha _, beta _). value () * pow (u, 1.0/alpha _);
Certificate -----------------------------------------------------------------------------------------------------------------------------------------------
2. Error 2:RepeatNsType$./InstallInstallation,
For example:
Mobile/nakagami. cc: In member function 'virtual double Nakagami: Pr (PacketStamp *, PacketStamp *, WirelessPhy *)':
Mobile/nakagami. cc: 183: 73: error: cannot call constructor 'erlangrandomvariable: ErlangRandomVariable 'directly
Mobile/nakagami. cc: 183: 73: error:For a function-style cast, remove the redundant ': ErlangRandomVariable'
Mobile/nakagami. cc: 185: 67: error: cannot call constructor 'GammaRandomVariable: GammaRandomVariable' directly
Mobile/nakagami. cc: 185: 67: error:For a function-style cast, remove the redundant ': GammaRandomVariable'
Make: *** [mobile/nakagami.O]Error1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
Solution:
InNs-allinone-2.33/ns-2.33/mobileFolder, findNakagami. ccFile, open it and find the corresponding183Delete row: ErlangRandomVariable, Save,
That is183Row
ResultPower = ErlangRandomVariable: ErlangRandomVariable (Pr/m, int_m). value ();
Changed:
ResultPower = ErlangRandomVariable (Pr/m, int_m). value ();
InNs-allinone-2.33/ns-2.33/mobileFolder, findNakagami. ccFile, open it and find the corresponding185Delete row::GammaRandomVariable, Save,
That is185Row
ResultPower = GammaRandomVariable: GammaRandomVariable (m, Pr/m). value ();
Changed:
ResultPower = GammaRandomVariable (m, Pr/m). value ();
RepeatNsType$./InstallInstall the SDK. If you encounter a similar problem again, find the corresponding file and number of lines and modify it. Until the installation is successful.