Installation Guide, Release 6.0.3
CFLAGS_[RELEASE/DEBUG]
To change the compiler command line options the build process is using, you should
specify them in the CFLAGS_RELEASE and CFLAGS_DEBUG variables. By default, the flags
required for debugging or optimization are detected automatically by the configure
script. If you set them manually, you should specify all options you need. It is rec-
ommended to check what options are detected automatically (check the Makefile.inc
after running configure and look for the CFLAGS_[RELEASE/DEBUG] variables.) and
add/modify those options manually in the configure.user file.
LDFLAGS
Linker command line options can be explicitly set using this variable. It is recommended
to check what options are detected automatically (check the Makefile.inc after run-
ning configure and look for the LDFLAGS variable.) and add/modify those options
manually in the configure.user file.
SHARED_LIBS
This variable controls whether the OMNeT++ build process will create static or dynamic
libraries. By default, the OMNeT++ runtime is built as a set of shared libraries. If
you want to build a single executable from your simulation, specify SHARED_LIBS=no in
configure.user to create static OMNeT++ libraries and then reconfigure (./configure)
and recompile OMNeT++ (make cleanall; make). Once the OMNeT++ static libraries
are correctly built, your own project have to be rebuilt, too. You will get a single, stati-
cally linked executable, which requires only the NED and INI files to run.
Warning: It is important to completely delete the OMNeT++ libraries (make cleanall)
and then rebuild them, otherwise it cannot be guaranteed that the created simulations
are linked against the correct libraries.
Note: The USE_DOUBLE_SIMTIME and WITHOUT_CPACKET options are no longer supported.
They were introduced in OMNeT++ 4.0 to help porting model code from OMNeT++ 3.x, and
having fulfilled their role, they were removed in OMNeT++ 5.0. If you still have old model code
to port, use OMNeT++ 4.x.
11.2 Moving the Installation
When you build OMNeT++ on your machine, several directory names are compiled into the
binaries. This makes it easier to set up OMNeT++ in the first place, but if you rename the
installation directory or move it to another location in the file system, the built-in paths
become invalid and the correct paths have to be supplied via environment variables.
The following environment variables are affected (in addition to PATH, which also needs to be
adjusted):
OMNETPP_IMAGE_PATH
This variable contains the list of directories where Qtenv looks for icons. Set it to point
to the images/ subdirectory of your OMNeT++ installation.
LD_LIBRARY_PATH
This variable contains the list of additional directories where shared libraries are looked
for. Initially, LD_LIBRARY_PATH is not needed because shared libraries are located via
the rpath mechanism. When you move the installation, you need to add the lib/ sub-
directory of your OMNeT++ installation to LD_LIBRARY_PATH.
Note: On macOS, DYLD_LIBRARY_PATH is used instead of LD_LIBRARY_PATH. On Windows,
42 Chapter 11. Build Options