NetAnim is not working in 5G-LENA model.

143 views
Skip to first unread message

Shahid Iqbal

unread,
Jul 15, 2022, 3:40:03 AM7/15/22
to 5G-LENA-users
HI, I am facing this problem while generating xml file for NetAnim. How can I solve this problem?  

~/Desktop/ns-allinone-3.36.1/ns-3.36.1$ ./ns3 run rem-example
Consolidate compiler generated dependencies of target rem-example
[  0%] Linking CXX executable ../../../../build/src/nr/examples/ns3.36.1-rem-example-default
CMakeFiles/rem-example.dir/rem-example.cc.o: In function `main':
/home/shahid/Desktop/ns-allinone-3.36.1/ns-3.36.1/src/nr/examples/rem-example.cc:695: undefined reference to `ns3::AnimationInterface::~AnimationInterface()'
/home/shahid/Desktop/ns-allinone-3.36.1/ns-3.36.1/src/nr/examples/rem-example.cc:695: undefined reference to `ns3::AnimationInterface::AnimationInterface(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/home/shahid/Desktop/ns-allinone-3.36.1/ns-3.36.1/src/nr/examples/rem-example.cc:695: undefined reference to `ns3::AnimationInterface::~AnimationInterface()'
collect2: error: ld returned 1 exit status
src/nr/examples/CMakeFiles/rem-example.dir/build.make:103: recipe for target '../build/src/nr/examples/ns3.36.1-rem-example-default' failed
make[3]: *** [../build/src/nr/examples/ns3.36.1-rem-example-default] Error 1
CMakeFiles/Makefile2:9146: recipe for target 'src/nr/examples/CMakeFiles/rem-example.dir/all' failed
make[2]: *** [src/nr/examples/CMakeFiles/rem-example.dir/all] Error 2
CMakeFiles/Makefile2:9152: recipe for target 'src/nr/examples/CMakeFiles/rem-example.dir/rule' failed
make[1]: *** [src/nr/examples/CMakeFiles/rem-example.dir/rule] Error 2
Makefile:2689: recipe for target 'rem-example' failed
make: *** [rem-example] Error 2

NetAnim.jpg

Tim Greller

unread,
Jul 18, 2022, 3:20:40 AM7/18/22
to 5G-LENA-users
hi,

how did you install NetAnim?
You can try these steps and see if you still get an error:

Install mercurial prerequisite (you start in the ns-3-dev directory)

apt install mercurial

Clone the NetAnim repo/ files using mercurial and enter the new directory

hg clone http://code.nsnam.org/netanim 
cd netanim

Build NetAnim

qmake NetAnim.pro make

Start the produced NetAnim executable:

./NetAnim

XML files produced during simulation can be loaded here.
You can test NetAnim with the xml files generated by the examples in src/netanim/examples:

./ns3 run "dumbbell-animation --nLeftLeaf=5 --nRightLeaf=5 --animFile=dumbbell.xml" ./ns3 run "star-animation --animFile=star.xml"

Reply all
Reply to author
Forward
0 new messages