virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard) is deprecated

177 views
Skip to first unread message

Yira

unread,
Apr 22, 2022, 3:30:29 PM4/22/22
to ns-3-users
Hi, I tried to run this ns3 project on ns 3.32 and I got below error

Project file: https://github.com/rams16592/WiFi-Comparison-NS3/blob/master/wifi_comparision.cc

```
user@pc:~/ns-allinone-3.32/ns-3.32$ ./waf --run "scratch/test.cc --isRtsCts=false --wifiStaNodesCount=12 --activeStaNodesCount=12 --data_rate_for_wifi=OfdmRate6_5MbpsBW20MHz" Waf: Entering directory `/home/osboxes/ns-allinone-3.32/ns-3.32/build' [2818/2870] Compiling scratch/test.cc ../scratch/test.cc: In function ‘int main(int, char**)’: ../scratch/test.cc:110:38: error: ‘virtual void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard)’ is deprecated [-Werror=deprecated-declarations] 110 | wifi.SetStandard (wifi_standard_used); | ^ In file included from ./ns3/spectrum-wifi-helper.h:24, from ./ns3/wifi-module.h:73, from ../scratch/test.cc:14: ./ns3/wifi-helper.h:527:16: note: declared here 527 | virtual void SetStandard (WifiPhyStandard standard); | ^~~~~~~~~~~ ../scratch/test.cc:117:5: error: ‘HtWifiMacHelper’ was not declared in this scope 117 | HtWifiMacHelper mac = HtWifiMacHelper :: Default (); // 802.11n network | ^~~~~~~~~~~~~~~ ../scratch/test.cc:121:2: error: ‘mac’ was not declared in this scope 121 | mac.SetType ("ns3::StaWifiMac", "Ssid", SsidValue (ssid), "ActiveProbing", BooleanValue (false)); | ^~~ cc1plus: all warnings being treated as errors Waf: Leaving directory `/home/osboxes/ns-allinone-3.32/ns-3.32/build' Build failed -> task in 'test' failed with exit status 1 (run with -v to display more information)
```

Please, any solution :(

Tom Henderson

unread,
Apr 22, 2022, 6:33:41 PM4/22/22
to ns-3-...@googlegroups.com
That program seems to be from about 5 years ago, but ns-3.32 is about 2
years ago, so you may want to try it on an ns-3 release from around the
time that the program was posted:
https://www.nsnam.org/releases/older/
Reply all
Reply to author
Forward
0 new messages