This step requires that you already have compiled the ewg tool. If you have downloaded a release package for you platform, you are lucky, since these packages already come with the ewg tool pre-compiled.
You can find examples on how to use EWG to create wrappers for C libraries in the directory ${EWG}/example. These examples are fully functional, in that they include the necessary build automation to build the examples using all platform/eiffel-compiler/c-compiler combinations.
Most examples wrap a 3rd party C library. If you want to build such an example please read the Readme.txt file in the examples directory. It is usually necessary for you to install certain development versions of the libraries to wrap. The Readme.txt file gives details on what is necessary.
To generate the Eiffel wrapper for a given example go into the library subdirectory of the examples directory. The examples usually have two subdirectories. library contains the files necessary to build the wrapper and hello_world contains the source code for an actual Eiffel application that uses the wrapper. For example to generate the wrappers for the simple-example do:
cd ${EWG}/example/simple/library
geant install
geant c_build_library
This will use the ewg tool to generate Eiffel and C files that make the c library accessible from within Eiffel. It may sound weird that C files are generated too, but it is unfortunately necessary. The generated C files will be compiled and put into a static link library.
To compile and run an example application go into the example applications directory. For example to build the hello_world application of the simple example do:
cd ${EWG}/example/simple/example/hello_world
geant install
geant compile
./hello_world