Re: netanim problem _ wscript

1,036 views
Skip to first unread message
Message has been deleted
Message has been deleted

tina

unread,
Jan 20, 2017, 11:24:38 AM1/20/17
to ns-3-users

Hi all,

I am trying to use netanim in ns3-dce examples. i am trying to see animation of dce-iperf-mptcp" which is located in "~/dce/source/ns-3-dce/example". I added #include "ns3/netanim-module.h" and "AnimationInterface anim ("animation.xml");" before Simulator::Run(). but at the end i got the following error:


undefined reference to `ns3::AnimationInterface::AnimationInterface(std::string)'


In the manual and google group, I saw that I have to add the "netanim" module into wscript. So, i added  the following lines in the start of wscript which exists in "~/dce/source/ns-3-dce/" ( i attached the wscript to this email.) 

def build (bld) :
    obj = bld.create_ns3_program ('/home/user/dce/source/ns-3-dce/example/dce-iperf-mptcp', ['core', 'network', 'dce', 'point-to-point','netanim'])
   
 obj.source = '/home/user/dce/source/ns-3-dce/example/dce-iperf-mptcp.cc' 

Then i did "./waf build" but the following error i receive. 

Waf: The wscript in '/home/user/dce/source/ns-3-dce' is unreadable
Traceback (most recent call last):
  File "/home/user/dce/source/ns-3-dce/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py", line 100, in waf_entry_point
    set_main_module(os.path.normpath(os.path.join(Context.run_dir,Context.WSCRIPT_FILE)))
  File "/home/user/dce/source/ns-3-dce/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Scripting.py", line 125, in set_main_module
    Context.g_module=Context.load_module(file_path)
  File "/home/user/dce/source/ns-3-dce/.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Context.py", line 354, in load_module
    try:exec(compile(code,path,'exec'),module.__dict__)
  File "/home/user/dce/source/ns-3-dce/wscript", line 17
    obj.source = 'dce-iperf-mptcp.cc'
                                     ^
IndentationError: unindent does not match any outer indentation level


Could you please guide me what i have to do?


wscript

tina

unread,
Jan 20, 2017, 11:46:16 AM1/20/17
to ns-3-users

I found the solution, funny! i had to add net anim in 
module.add_example(needed = ['core', 'network', 'dce', 'point-to-point', 'mobility','netanim'],
                       target='bin/dce-iperf-mptcp',
                       source=['example/dce-iperf-mptcp.cc'])

:)

Konstantinos

unread,
Jan 20, 2017, 11:48:02 AM1/20/17
to ns-3-users
Hi, 

You could easily search for the error you are getting
"IndentationError: unindent does not match any outer indentation level"
and you could find several topics online with solutions, e.g.

Check the identation of your code, do not use tabs when spaces are required.

Regards,
K
Reply all
Reply to author
Forward
0 new messages