Setup NS2 for Eclipse under Linux

  • Download Eclipse SDK
  • Download Eclipse C++ Development Tooling
  • Extract Eclipse SDK to a folder, i.e. /home/username/eclipse
  • Extract Eclipse CDT to the same folder
  • Download NS2
  • Extract NS2 to a folder, i.e. /home/username/ns-allinone-2.29
  • Edit Makefile if necessary (see note below for details)
  • Build NS2
  • Start Eclipse
  • Choose your ns2 folder as your workspace folder, default:/home/username/ns-allinone-2.29
  • Create new C++ Project
    • Select File->New->Project...
    • Select C++->Standard C++ Make Project
    • Click Next
    • Enter ns-2.29 as your project name
    • Click Finish
  • Create a Launch Configuration
    • Select Run->Debug...
    • Select C/C++ Local Application
    • Click "New Launch Configuration"
    • Under Project, click Browse and select "ns-2.29"
    • Under C/C++ Application, click Search Project and select "ns"
    • Click Apply
    • Click Close
  • Note: The debugger needs debug information to be generated by the compiler. To make the compiler generate these informations, you have to edit the NS2 makefile. Edit ".../ns-allinone-2.29/ns-2.29/Makefile" or edit ".../ns-allinone-2.29/ns-2.29/Makefile.in" and run "./configure" after that. Add those lines anywhere:
    CCOPT = -g # Hinzufügen der "-g"-Option
    DEFINE = -DNDEBUG # Löschen des NoDebug-Flags
    DEFINE = -DDEBUG # Hinzufügen des Debug-Flags
  • Additional Note: Eclipse creates project and workspace files in the NS2 folder.These should be excluded from CVS checkins and patch creations. Add those files to your cvsignore, respectively delete them from your patchfile after creating it.

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

Research Project 2021-2023

EUMMAS A2S Conference, 19-25 Dubai 2023, United Arab Emirates

Research Paper 2021