I'm new to ns3 and below are my questions.
My environment:
ubuntu 15.04
install by ns-allinone-3.24.tar.bz2 and following tutorial
Question:
1.1
I just followed the tutorial and have run myfirst.cc. It gave right output. Then accidentally, I found that a syntax error in examples/tutorial/first.cc makes the build of scratch/myfirst.cc fail!
1.2
I tried to comment out all the staff in main() except "return 0;" in examples/tutorial/first.cc, then I execute ./waf and ./waf --run scratch/myfirst. Everything goes well as the code in scratch/myfirst.cc.
1.3 Then I went further to delete examples/tutorial/first.cc, run ./waf and get the following error:
Waf: Entering directory `/home/hong/Desktop/Software/ns3/bake/source/ns-3.24/build'
Waf: Leaving directory `/home/hong/Desktop/Software/ns3/bake/source/ns-3.24/build'
source not found: 'first.cc' in bld(use=['ns3-core', 'ns3-point-to-point', 'ns3-internet', 'ns3-applications'], features=['cxx', 'cxxprogram'], idx=2, meths=['process_rule', 'process_source', 'apply_link', 'process_use', 'propagate_uselib_vars', 'apply_incpaths', 'collect_compilation_db_tasks', 'create_task_macapp', 'create_task_macplist', 'install_boost', 'set_full_paths_hpux', 'set_macosx_deployment_target'], prec=defaultdict(<type 'list'>, {}), _name='first', posted=True, source='first.cc', ns3_module_dependencies=['ns3-core', 'ns3-point-to-point', 'ns3-internet', 'ns3-applications'], mappings={}, path=/home/hong/Desktop/Software/ns3/bake/source/ns-3.24/examples/tutorial, includes='#', is_ns3_program=True, target='ns3.24.1-first-debug') in /home/hong/Desktop/Software/ns3/bake/source/ns-3.24/examples/tutorial
So, from 1.1 and 1.3, examples/tutorial/first.cc influence the result of scratch/myfirst.cc; however, from 1.2, there seems to be no such influence.
I read the tutorial from start to Chap.5 carefully, but get no clue. Could you please tell me the relationship between these two?
2.
I'm sure I'm using ns3.24 and the tutorial is for ns3.24. But the my file organization is different from that in tutorial.
The biggest difference is that in tutorial it's `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' while in my case it's `/home/hong/Desktop/Software/ns3/bake/source/ns-3.24/build'. There is no folder named repos or ns-3-dev in my all computer!
Thank you for your time and I'm looking for your reply.