Chapter 5. Understanding EWG

Table of Contents

Command Line Options
The Generated Code
Functions
Structs
Enums
Callbacks
The Build Process
The Runtime Library
Pointers
Wrapper Objects
Wrapper Modes
The Configuration File
Dependent Types

This chapter describes what code EWG generates and how to integrate that code into a automated build system.

Command Line Options

The ewg tool is a command line application and takes the following command line parameters:

	   ewg   [--version] [--verbose]
		  [--enable-msc-extensions | --disable-msc-extension] [--output-dir=<...>]
                --cpp-full-header=<...> [--include-header=<...>] [--config=<...>]

	 
  • options:

    • --version ... Output EWG version number

    • --verbose ... Output progress information on STDOUT

    • --enable-msc-extensions ... Enable Visual C++ extensions (default on Windows)

    • --disable-msc-extensions ... Disable Visual C++ extensions (default everywhere else :)

  • arguments:

    • --output-dir ... Directory where generated files will be placed

    • --cpp-full-header ... File name (including path name) to the already c preprocessed C header

    • --include-header ... Name of header file, that should be used in eiffel external clauses

    • --config ... Name of config file to use. A config file allows to customize the wrapping process

You can use ewg directly to see what it produces on a header of your own without setting up a complete project, or use your own build process. Most of the time you will not use the ewg tool directly, but use it indirectly through geant.