# error in NS2 when use make to print using printf



## Ahussain (Mar 21, 2011)

Dear all,

I have made some changes to aodv.cc and aodv.h in ns-2.31 to print the position and speed of nodes using cygwin using printf. Iam getting following errors when I compile using make command. I have even tried make clean and make depend but still I get these errors. 

 I get these errors even if I only try to print HELLO using printf(“HELLO\n”); in aodv.cc

I would be very grateful if anyone can solve my problem

Thanks in advance.
Asad

[email protected] ~/ns-allinone-2.31/ns-allinone-2.31/ns-2.31
$ make
make: Circular tcpip/socket.cpp <- tcpip/socket.cpp dependency dropped.
make: Circular tcpip/storage.cpp <- tcpip/storage.cpp dependency dropped.
g++ -o ns \

/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x94c): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x971): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0xbe9): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0xc3e): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x1700): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x1725): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x17f2): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x17fd): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x1816): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x183b): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x1908): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x1913): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x21ba): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x21df): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2282): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x228d): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x22a6): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x22cb): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x236e): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2379): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2392): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x23b7): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x245a): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2465): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x247e): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x24a3): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2546): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2551): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x256a): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x258f): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2632): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x263d): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2656): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x267b): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x271e): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2729): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2742): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2767): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x280a): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2815): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x282e): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2853): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x291a): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2925): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x293e): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2963): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2a2a): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2a35): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2a4e): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2a73): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2b0b): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2b16): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2b2e): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2b53): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2bf6): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2c01): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2d52): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2d77): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2e53): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2e65): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2e80): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2ea5): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2f81): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2f93): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2fae): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x2fd3): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x30af): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x30c1): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x30dc): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x3101): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x31dd): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x31ef): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x320a): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x322f): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x330b): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x331d): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x3338): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x335d): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x3439): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x344b): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x3466): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x348b): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x3575): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x3587): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x35a2): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x35c7): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x36b1): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x36c3): undefined reference to `__Unwind_SjLj_Unregister'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x36de): undefined reference to `___gxx_personality_sj0'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x3703): undefined reference to `__Unwind_SjLj_Register'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x37df): undefined reference to `__Unwind_SjLj_Resume'
/home/!asadh/ns-allinone-2.31/ns-allinone-2.31/tclcl-1.19/libtclcl.a(Tcl.o):Tcl.
cc.text+0x37f1): undefined reference to `__Unwind_SjLj_Unregister'
collect2: ld returned 1 exit status
make: *** [ns] Error 1
[email protected] ~/ns-allinone-2.31/ns-allinone-2.31/ns-2.31
$
************


----------

