Error in installing ns-2.33 in Ubuntu11.04 and Solution

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.