- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- make failed
hi all
i am a new user to ns-2. i have started ns-2 by reading the examples from “NS by example”. in this tutorial i tried the example from otcl linkage section.
i downloaded both .cc and .tcl code from the site. then i place the object.o in Makefile (OBJ_CC) placed under ns-2.30 directory. when i run the make clean or make command i get the following message
Makefile:311:*** command commence before the target. stop.
kindly help
Neeraj
Open the Makefile in vi editor (not other editor).
See the line you have just inserted(object.o in Makefile (OBJ_CC)).
Probably you will see ^M character at the end of the file.
Remove that character and compile again.
If you do not know vi editor, then open the file in any gui editor and position the cursor at the end of the line and delete all the characters(It will delete the invisible ^M). (It will bring the next line to the current line. So just press enter to bring the next line to its original position). Repeat the same procedure for all the lines where you have inserted a new line.
The Procedure may seems to be strange but it solved my problem in several occasions. Probably it will solve your problem also.
Reason (as far as I believe): I faced the problem while doing cut and past from a dos file to unix file.
Some times make will be successful even if we are having ^M at some other places. I don’t know why. If some one is familiure with the problem, then kindly discuss your experience here.
If you are adding “ex-linkage.o” then you have to refer the full path.
That is if you are keeping the files ex-linkage.cc and ex-linkage.h under the directory
ns-allinone-2.30ns-2.30test
then you have to mention it as follows
test/ex-linkage.o