recompiling .h and .cc files in ns2 does not shows changes made to them
Hi. I'm working in ns-2.29 on fedora 15.
I've made some changes inside already existing header and c++ files in wimax directory in ns2. I saved the changes, then under /ns-2.29 I applied following: make clean make depend make to recompile ns2 and I got no errors, I got: make[1]: Entering directory `/home/N/ns2/ns-allinone-2.29/ns-2.29/indep-utils/cmu-scen-gen/setdest' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/N/ns2/ns-allinone-2.29/ns-2.29/indep-utils/cmu-scen-gen/setdest' ... which I know its not an error. but even after recompiling the files,the changed I made are not applied. when I run my tcl file I get an error. what should I do to properly compile the codes so it reflects my modifications? Thanks in advance. |
make DOSE NOT install anything
Code:
su most programs install to /usr or /usr/local by default Now some require that YOU manually move the program out of the build folder or run in the build folder ( not a good idea ) also did you restart the very OLD ns 2.29 ( .34 is the current OLD 2 version i think. ) also be advised that fedora 15 is UNSUPPORTED currently ONLY fedora 16 and 17 are supported and VERY SOON fedora 16 will go END OF LIFE after fedora 18 comes out DOSE the "makefile" actually have a "clean" section DEFINED ???? not all do ? if not YOU will have to manually delete the old files YOU defined in the BUILD folder and rebuild ( it is EVER NEVER NEVER YES NEVER a good idea to build software IN your source folder/ working folder ) also "make clean" will NOT remove any prerequisites that needed building " distclean" will do that IF defined in the makefile |
Yes, everything looks OK.
Quote:
And please tell which files it's about, + specify the edited line numbers. Also : Please attach your tcl script. As name.tcl.txt . Attachments : The paper clip tool in the 'Advanced Editor'. . |
Thank you for the reply.
Quote:
Quote:
Quote:
CLEANFILES = ns nse nsx ns.dyn $(OBJ) $(OBJ_EMULATE_CC) \ $(OBJ_EMULATE_C) common/tclAppInit.o \ $(GEN_DIR)* $(NS).core core core.$(NS) core.$(NSX) core.$(NSE) \ common/ptypes2tcl common/ptypes2tcl.o and clean: $(RM) $(CLEANFILES) and distclean: distclean-recursive $(RM) $(CLEANFILES) Makefile config.cache config.log config.status \ autoconf.h gnuc.h os-proto.h $(AUTOCONF_GEN); \ $(MV) .configure .configure- ;\ echo "Moved .configure to .configure-" distclean-recursive: for i in $(SUBDIRS); do ( cd $$i; $(MAKE) clean; $(RM) Makefile; ) done |
Thank you for the reply.
Quote:
I added new algorithm inside /wimax/scheduling/bsscheduler.h and .cc files. There are some algorithms alreay defined there. in bsscheduler.h,I decleared my algorithm and in bsscheduler.cc I defined its body, also in command() function I added the algorithm name like other algorithms so when user runs the tcl file and enteres the algorithm name ns runs the algorithm code. SO, when I compile using: make clean , make depend , make , I get no errors. When I run the tcl and choose "M" as algorithm,I get following: Error! Unknown rtPS scheduling algorithm This line is written inside commande() function in bsscheduler.cc I've added my algorithm name inside command() but I dont know why it doesnt recognise it. |
Error solved. Thank you for the post
Quote:
Now run "sudo make install". Quote:
Quote:
|
I got an error when I tried to execute the "sudo make install" command after making changes in the .cc file. Can I get some help to resolve
Now run "sudo make install".
if you just run "make install", it may give an error like this I have run the "sudo make install" command and I got an error similar to what you've said. It's like this: for d in /usr/local/man/man1; do \ if [ ! -d $d ]; then \ mkdir -p $d ;\ fi;\ done /usr/bin/install -c -m 755 ns /usr/local/bin /usr/bin/install -c -m 644 ns.1 usr/local/man/man1 How to resolve this error? Could someone help me with this? |
Post #7, @sowjanyadasari : Welcome to LQ.
No errors are shown in the quoted text. (And no word "error"). ... The text only shows what's happening ! $ man install https://linux.die.net/man/1/install ns2 INFO https://docs.google.com/document/d/1...usp=share_link - |
Ohh Okay! Thanks for the reply. I didn't realise it, but the changes I've made aren't being reflected when I run the TCL file. Can anyone explain why?
And if there's any tutorial/ video/ web page on how to modify protocols in ns2, sharing the link for the same would be appreciated. Thank you :) |
Re #9
Quote:
1) Sometimes the right "Tcl hook" must be included in the C++ code. 2) And changes may have to include some lines in tcl/lib/[ns-files.tcl] ... e.g. ns-agent.tcl, ns-default.tcl?, ns-lib.tcl, ns-mobilenode.tcl, ns-packet.tcl 3) A certain text may be required in the simulation.tcl to achieve a visible result in the terminal output / in some extra output file(s). - |
Quote:
|
All times are GMT -5. The time now is 12:47 AM. |