OMNeT++ Installation Guide Version 4.3 Copyright © 2011 András Varga and OpenSi
OMNeT++ Installation Guide Version 4.3 Copyright © 2011 András Varga and OpenSim Ltd. iv Table of Contents 1. General Information ........................................................................................... 1 2. Windows ............................................................................................................. 2 3. Mac OS X ........................................................................................................... 6 4. Linux ................................................................................................................ 11 5. Ubuntu ............................................................................................................. 17 6. Fedora 18 ......................................................................................................... 21 7. Red Hat ............................................................................................................ 23 8. OpenSUSE ....................................................................................................... 25 9. Generic Unix .................................................................................................... 27 10. Build Options ................................................................................................. 34 1 Chapter 1. General Information 1.1. Introduction This document describes how to install OMNeT++ on various platforms. One chapter is dedicated to each operating system. 1.2. Supported Platforms OMNeT++ has been tested and is supported on the following operating systems: • Windows 7, 8 and XP • Mac OS X 10.7 and 10.8 • Linux distributions covered in this Installation Guide The Simulation IDE can be used on the following platforms: • Linux x86 32/64-bit • Windows 7, 8 and XP • Mac OS X 10.7 and 10.8 Simulations can be run practically on any unix-like environment with a decent and fairly up-to-date C++ compiler, for example gcc 4.x. Certain OMNeT++ features (Tkenv, parallel simulation, XML support, etc.) depend on the availability of external libraries (Tcl/Tk, MPI, LibXML or Expat, etc.) IDE platforms are restricted because the IDE relies on a native shared library, which we compile for the above platforms and distribute in binary form for convenience. 2 Chapter 2. Windows 2.1. Supported Windows Versions The supported Windows versions are the Intel 32-bit versions of Windows XP , and later versions such as Windows 7 and 8. 64-bit Windows versions are also supported, but be aware that binaries bundled with OMNeT++ are 32-bit ones, and simulations will also be compiled in 32-bit mode. 2.2. Installing OMNeT++ Download the OMNeT++ source code from http://omnetpp.org. Make sure you select the Windows-specific archive, named omnetpp-4.3-src-windows.zip. The package is nearly self-contained: in addition to OMNeT++ files it includes a C++ compiler, a command-line build environment, and all libraries and programs required by OMNeT++. Copy the OMNeT++ archive to the directory where you want to install it. Choose a directory whose full path does not contain any space; for example, do not put OMNeT++ under Program Files. Extract the zip file. To do so, right-click the zip file in Windows Explorer, and select Extract All from the menu. You can also use external programs like Winzip or 7zip. Rename the resulting directory to omnetpp-4.3. When you look into the new omnetpp-4.3 directory, should see directories named doc, images, include, msys, etc., and files named mingwenv.cmd, configure, Makefile, and others. 2.3. Configuring and Building OMNeT++ Start mingwenv.cmd in the omnetpp-4.3 directory by double-clicking it in Windows Explorer. It will bring up a console with the MSYS bash shell, where the path is already set to include the omnetpp-4.3/bin directory. If you want to start simulations from outside the shell as well (for example from Explorer), you need to add OMNeT++'s bin directory to the path; instructions are provided later. First, check the contents of the configure.user file to make sure it contains the settings you need. In most cases you don’t need to change anything. notepad configure.user Then enter the following commands: $ ./configure $ make The build process will create both debug and release binaries. Windows 3 2.4. Verifying the Installation You should now test all samples and check they run correctly. As an example, the dyna example is started by entering the following commands: $ cd samples/dyna $ ./dyna By default, the samples will run using the graphical Tkenv environment. You should see GUI windows and dialogs. 2.5. Starting the IDE OMNeT++ comes with an Eclipse-based Simulation IDE. You should be able to start the IDE by typing: $ omnetpp We recommend that you create a shortcut for starting the IDE. To do so, locate the omnetpp.exe program in the omnetpp-4.3/ide directory in Windows Explorer, right- click it, and choose Send To > Desktop (create shortcut) from the menu. On Windows 7, you can right-click the taskbar icon while the IDE is running, and select Pin this program to taskbar from the context menu. When you try to build a project in the IDE, you may get the following warning message: Toolchain "…" is not supported on this platform or installation. Please go to the Project menu, and activate a different build configuration. (You may need to switch to the C/C++ perspective first, so that the required menu items appear in the Project menu.) If you encounter this message, choose Project > Properties > C/C++ Build > Tool Chain Editor > Current toolchain > GCC for OMNeT++. 2.6. Environment Variables If you want to start OMNeT++ simulations outside the shell as well (for example from Exlorer), you need to add OMNeT++'s bin directory to the path. First, open the Environment Variables dialog. • On Windows XP and Vista: Right-click My Computer, and choose Properties > Advanced > Environment variables. • On Windows 7: Click the Start button, then start typing environment variables into the search box. Choose Edit environment variables for your account when it appears in the list. The dialog comes up. In the dialog, select path or PATH in the list, click Edit. Append ";<omnetpp- dir>\bin" to the value (without quotes), where <omnetpp-dir> is the name of the OMNeT++ root directory (for example C:\omnetpp-4.3). Hit Enter to accept. You need to close and re-open any command windows for the changes to take effect in them. 2.7. Reconfiguring the Libraries If you need to recompile the OMNeT++ components with different flags (e.g. different optimization), then change the top-level OMNeT++ directory, edit configure.user accordingly, then type: Windows 4 $ ./configure $ make clean $ make If you want to recompile just a single library, then change to the directory of the library (e.g. cd src/sim) and type: $ make clean $ make By default, libraries are compiled in both debug and release mode. If you want to make release or debug builds only, use: $ make MODE=release or $ make MODE=debug By default, shared libraries will be created. If you want to build static libraries, set SHARED_LIBS=no in configure.user and re-configure your project. The built libraries and programs are immediately copied to the lib/ and bin/ subdirs. 2.8. Portability Issues OMNeT++ has been tested with the MinGW gcc compiler. The current distribution contains gcc version 4.7. Microsoft Visual C++ is not supported in the Academic Edition. 2.9. Additional Packages Note that Doxygen and GraphViz are already included in the OMNeT++ package, and do not need to be downloaded. 2.9.1. MPI MPI is only needed if you would like to run parallel simulations. There are several MPI implementations for Windows, and OMNeT++ does not mandate any specific one. We recommend DeinoMPI, which can be downloaded from http://mpi.deino.net. After installing DeinoMPI, adjust the MPI_DIR setting in OMNeT++'s configure.user, and reconfigure and recompile OMNeT++: $ ./configure $ make cleanall $ make In general, if you would like to run parallel simulations, we recommend that you use Linux, OS X, or another unix-like platform. 2.9.2. PCAP The optional WinPcap library allows simulation models to capture and transmit network packets bypassing the operating system’s protocol stack. It is not used directly Windows 5 by OMNeT++, but OMNeT++ detects the necessary compiler and linker options for models in case they need it. 2.9.3. Akaroa Akaroa 2.7.9, which is the latest version at the time of writing, does not support Windows. You may try to port it using the porting guide from the Akaroa distribution. 6 Chapter 3. Mac OS X 3.1. Supported Releases This chapter provides additional information for installing OMNeT++ on Mac OS X. The following releases are covered: • Mac OS X 10.7 (Lion) • Mac OS X 10.8 (Mountain Lion) 3.2. Installing the Prerequisite Packages • Install the Java Runtime from http://support.apple.com/kb/DL1572 , because OS X does not provide it by default. • Install the command line developer tools (gcc, gdb etc.) for OS X from http:// developer.apple.com/downloads/index.action?=Command%20Line%20Tools (you will need a free Apple Developer Account for the download.) • Install the quartz project from http://xquartz.macosforge.org/. Quartz will provide some X headers required by the simulation runtime environment. Installing additional packages will enable more functionality in OMNeT++; see the Additional packages section at the end of this chapter. 3.3. Downloading and Unpacking OMNeT++ Download OMNeT++ from http://omnetpp.org. Make sure you select to download the generic archive, omnetpp-4.3-src.tgz. Copy the archive to the directory where you want to install it. This is usually your home directory, /Users/<you>. Open a terminal, and extract the archive using the following command: $ tar zxvf omnetpp-4.3-src.tgz A subdirectory called omnetpp-4.3 will be created, containing the simulator files. Alternatively, you can also unpack the archive using Finder. The Terminal can be found in the Applications / Utilities folder. 3.4. Environment Variables OMNeT++ needs its bin/ directory to be in the path. To add bin/ to PATH temporarily (in the current shell only), change into the OMNeT++ directory and source the setenv script: $ cd omnetpp-4.3 Mac OS X 7 $ . setenv To set the environment variables permanently, uploads/Litterature/ install-guide 18 .pdf
Documents similaires
-
16
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Jul 18, 2022
- Catégorie Literature / Litté...
- Langue French
- Taille du fichier 0.8935MB