- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- how include the c code in ns2 coding
i have c coding for hash algorithm.. now i need to add this code to dsr protocol….. actual dsr protocol code is in ns2….. how i include this c code in ns2 project…….. 🙂
First lean to compile ns2 (I mean – after installing nsallinone package , if everything work good, you can seperately compile ns2 from
./ns-allinone-2.xx/ns-2.xx folder)
do the following
if you want to include some function in aodv, then add them inside aodv.cc and aodv.h according to the syntax (normal c++ way).
#cd ns-allinone-2.xx/ns-2.xx
#make clean (sometimes, it is not necessary)
#make
#make install (sometimes, it is not necessary)
If yo see any compile time error, correct them.
and do the make again.
Thats all.
If your function is logically correct, then it will work.