Welcome to LQ.
None of the default compilers can be used for ns-2.28, dated year 2005.
(The default compilers are g++-4.4, g++-4.5, g++-4.6 ( 4.6 is the system compiler.))
Also : No old Ubuntu compilers will work.
Please use 'gcc41-compat-4.1.2-ubuntu1210_i386.deb'
https://docs.google.com/file/d/0B7S2...it?usp=sharing
And 'g++41-compat-4.1.2_i386.deb'
https://docs.google.com/file/d/0B7S2...it?usp=sharing
The install instructions for ns-allinone-2.28 are here, post # 15 , § 1) .. 6)
http://www.linuxquestions.org/questi...4-a-842773/#15
( The text about post # 3 can be ignored.
Not valid when both patches, ns228-gcc40.patch, ns-2.28-gcc410.patch are used.)
-