Problems with NS2 simulator

I am using Cygwin on my windows 8.1 and trying to run a tcl file but I encountered error “nam: no display name and no $DISPLAY environment variable” every time when I try to run.

Auto Generated Inline Image 1.png
I even tried to export the $DISPLAY as
Auto Generated Inline Image 2.pngbut getting nothing on the nam: output after running my tcl file. Any one who try to help me will be appreciated! Kind request…

I’m don’t entirely understand how this question is related to BeagleBoard, since you’re attempting to run an X application on Cygwin. Have you actually installed the XOrg packages which enable Cygwin to do so, and lauched the xorg service?
https://x.cygwin.com/docs/ug/setup.html

https://x.cygwin.com/docs/ug/using.html

so, when you export $DISPLAY it’s not complaining about display any more, right?
what exactly happens, though? do you see any graphical output? what gets printed on the stdout of the console from which you run your program?
What is it supposed to do?

Auto Generated Inline Image 1.png

Auto Generated Inline Image 2.png