Page MenuHomePhabricator

Updated 404 Days AgoPublic

Building EFL for Windows

Either to run EFL applications or to develop new EFL applications, here are two options to build it:

  1. Using EWPI (Recommended)
  2. Using win-builds (Old compiler and dependencies)

Using EWPI

this section describes the installation of the dependencies using EWPI, To install EWPI, We need the following dependencies:

  • mingw-w64 toolchain
  • makensis (for NSIS installer)
  • tar
  • make
  • cmake
  • yasm
  • nasm
  • wget
  • gperf
  • python 3
  • meson >= 0.55.0
  • ninja
  • flex
  • bison

If you are using Windows to build EFL jump to Prerequisites on Windows, but if you are using Unix based environment to build it go to Prerequisites on Unix.

Prerequisites on Windows

Install MSYS2: go to the link and follow the steps 1 to 6.

Close msys2 application and make sure to run either mingwin64.exe or mingwin32.exe depend on your machine.
Note that if you have selected the default installation location, it will be located here: C:\msys64\

For 32 bits, run the following command on MSYS2 MinGW32 terminal:

pacman -S autoconf automake libtool tar git wget gperf python bison gettext-devel make mingw-w64-i686-nasm mingw-w64-i686-yasm mingw-w64-i686-cmake mingw-w64-i686-toolchain mingw-w64-x86_64-ninja mingw-w64-i686-python3-pip

For 64 bits, run the following command on MSYS2 MinGW64 terminal:

pacman -S autoconf automake libtool tar git wget gperf python bison gettext-devel make mingw-w64-x86_64-nasm mingw-w64-x86_64-yasm mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-ninja mingw-w64-x86_64-python3-pip

We need at least meson 0.59, so if needed :

pip3 install meson==0.59.0

On Windows, we need to remove a glib binary, otherwise gstremaer fails to build. For example on 64 bits :

rm /mingw64/bin/glib-mkenums.exe

Now we can build EWPI jump to Compilation of EWPI to build it.

Prerequisites on Unix

Use your package manager to install the dependencies above:

sudo dnf install gcc-c++ git make cmake wget gperf python bison flex nasm yasm mingw64-pkg-config mingw64-gcc mingw64-gcc-c++ ninja-build  gettext-devel mingw-w64-tools nsis

To install meson using pip3:

pip3 install meson

Compilation of EWPI

Run mingw64/32 terminal then:

  • clone EWPI:
git clone
  • Navigate to EWPI directory:
cd ewpi
  • compile ewpi:
gcc -std=c99 -o ewpi ewpi.c ewpi_map.c
  • Check if ewpi is built successfully, by printing the help:
./ewpi --help

Usage: C:\Documents\msys2\home\vincent.torri\gitroot_64\ewpi\ewpi.exe [OPTION]

Compile and install the EFL dependencies.

Optional arguments:
  --help        show this help message and exit
  --version     show the Ewpi version and exit
  --prefix=DIR  install in  DIR (must be an absolute path)
                  [default=$HOME/ewpi_$arch] $arch=32|64 base on
                  host value
  --host=VAL    host triplet, either i686-w64-mingw32 or x86_64-w64-mingw32
  --arch=VAL    value passed to -march and -mtune gcc options
                  [default=i686|x86-64], depending on host value
  --verbose     verbose mode
  --strip       strip DLL
  --nsis        strip DLL and create the NSIS installer
  --efl         install the EFL
  --jobs=VAL    maximum number of used jobs [default=maximum]
  --clean       remove the archives and the created directories
                  (not removed by default)

  ./ewpi --prefix=/opt/ewpi_32 --host=i686-w64-mingw32
  ./ewpi --host=x86_64-w64-mingw32 --efl --jobs=4
  • Now use EWPI to install the dependencies:

for mingw32

./ewpi --prefix=/opt/ewpi_32 --host=i686-w64-mingw32

for mingw64

./ewpi --prefix=/opt/ewpi_64 --host=x86_64-w64-mingw32

Change the installation directory /opt/ewpi_** with anything you want.

Note: With MSYS2, you may get an error when running ewpi for the first time only. Indeed, 2 packages have symbolic links: sox and mupdf, and ewpi fails when untar these packages. Just re-run ewpi again for both package when you have the error.

Now dependencies are installed, we can build and install EFL.

EFL Configuration and compilation

We will use meson and ninja to build EFL, but first we need to download the repository, open mingw64/32 terminal and clone EFL repo:

git clone

Navigate to the clone directory:

cd efl/

Update environment flags:

export PATH=/opt/ewpi_64/bin:$PATH
export PKG_CONFIG_PATH=/opt/ewpi_64/lib/pkgconfig
export EFL_RUN_IN_TREE=1
export CPPFLAGS="-I/opt/ewpi_64/include -DECORE_WIN32_WIP_POZEFLKSD"
export CFLAGS="-g3 -ggdb3 -Og -pipe"
export CXXFLAGS="-g3 -ggdb3 -Og -pipe"
export LDFLAGS=-L/opt/ewpi_64/lib

Create build directory and navigate to it:

mkdir builddir && cd builddir

Run meson to setup build environment:

meson .. --prefix=/opt/efl_64 --buildtype=release --default-library shared  -Dsystemd=false -Dpulseaudio=false -Dv4l2=false -Dlibmount=false -Deeze=false -Dx11=false -Dxinput2=false -Devas-loaders-disabler='pdf','ps','rsvg','json' -Dopengl=none -Dpixman=true -Dembedded-lz4=false -Dfribidi=true -Dinput=false -Deeze=false -Dbuild-examples=false -Dbuild-tests=false -Dbindings='lua','cxx' -Dlua-interpreter=luajit -Delua=true

Now build EFL using ninja:


To install EFL run this:

ninja install

Don't forget to unset EFL_RUN_IN_TREE flag:


Now you are all set and ready to develop :D

Using win-builds

This section shows how to use win-builds, this depends on old compilers and dependencies and left for referencing!

For users

The win-builds project provides a package manager and packages for the EFL along with dependencies (from the toolchain to elementary). All libraries are provided as shared objects.

It is the easiest and advised way to get things installed and working.

For developers

The best way to get EFL for Windows is to cross compile them on Linux using win-builds. Install the packages from there and get the EFL and Elementary sources either:

  • from git at git:// and git://
  • from the Enlightenment download page

Then get the Makefile with all the pre-set configuration options for efl:


Use win-builds packages without yypkg

Some distros package x86_64-w64-mingw32-gcc, such as ArchLinux. There, instead of installing win-build's package manager (which requires to be compiled using ocaml), one can download files manually or use the following automation script:

It assumes you have a cross compiler x86_64-w64-mingw32-gcc and a native eolian_gen in $PATH, then will install stuff to ~/efl-windows_64, as well as generate a helper script ~/efl-windows_64/

Build and install EFL/Elementary natively

In this section, we will install MSYS2 and Win-Builds 1.5 in D:\MSYS2.

MSYS2 installation

  • Download MSYS2 here, choosing the target you want (either i686 or x86_64). The x86_64 target will be installed in that tutorial, but the i686 one is exactly the same (notes will be added for its installation). Do not launch MSYS2 when installation is finished. Launch instead in the Start menu "MSYS2 MinGW 64-bit".
  • Follow instructions 1. to 7 on the MSYS2 website. (Instruction 8. is useless) with the 3 following modifications:
    • Instructions 3.: The installation directory is D:\MSYS2.
    • Instruction 6.: The command will be pacman -Syu (remove catgets and libcatgets).
    • Instruction 7.: The command will be pacman -S cvs git make autoconf automake libtool gettext-devel.

Packages installation

We use Win-Builds 1.5 package manager to install necessary packages to build EFL.

  • Download Win-Builds here.
  • In the GUI window, select:
    • Cygwin or MSYS
    • x86_64 (if you want i686, let the selection as is)
    • Use the mirror that is proposed:
    • The installation directory is the one chosen for MSYS2 in the previous paragraph, instruction 3. of the MSYS2 instructions (for this tutorial, D:\MSYS2). By default, MinGW-64 will be installed in D:\MSYS2\opt\windows_64 (or D:\MSYS2\opt\windows_32 for i686) and the binaries in D:\MSYS2\opt\windows_64\bin.
    • Click on OK.
    • In the new UI window, instead of Install for the EFL and Elementary, select with the mouse As is. The EFL and Elementary will not be installed and will not confict with other EFL and Elementary installations -Click on Process
  • Post installation for 64 bits: in MSYS2 terminal, open /etc/profile with your favorite editor, and at the end:
export PKG_CONFIG_PATH=/opt/efl_64/lib/pkgconfig:/opt/windows_64/lib64/pkgconfig
export PATH=/opt/efl_64/bin:/opt/windows_64/bin:$PATH
export ACLOCAL_PATH="/opt/windows_64/share/aclocal/"
  • Post installation for 32 bits: in MSYS2 terminal, open /etc/profile with your favorite editor, and at the end:
export PKG_CONFIG_PATH=/opt/efl_32/lib/pkgconfig:/opt/windows_32/lib/pkgconfig
export PATH=/opt/efl_32/bin:/opt/windows_32/bin:$PATH
export ACLOCAL_PATH="/opt/windows_32/share/aclocal/"
  • Close the terminal and launch a new one.

EFL Installation

git clone
  • Load win-builds environment for x86_64 architecture
. /opt/windows_64/bin/win-builds-switch 64
  • Define the following environment variables for 64 bits:
  • Define the following environment variables for 32 bits:
  • Run 'autoreconf -vif', then 'configure' with the following options:
CFLAGS="-g3 -ggdb3 -Og" CXXFLAGS="-g3 -ggdb3 -Og" CPPFLAGS=-DECORE_WIN32_WIP_POZEFLKSD ./configure --prefix=/opt/efl_x86_64 --host=x86_64-w64-mingw32 --disable-static --with-tests=regular --with-crypto=openssl --disable-harfbuzz --disable-gstreamer1 --disable-gstreamer --disable-physics --disable-libmount --disable-valgrind --enable-lua-old --disable-avahi --disable-spectre --disable-libraw --disable-librsvg --disable-pulseaudio --disable-cxx-bindings
  • Run 'make -j4' then 'make install'
Last Author
Last Edited
Dec 28 2021, 2:29 AM
gamersalpha, lauromoura