Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (34 sloc) 2.31 KB
We support building libcaer on the Windows platform by using the MinGW32/64 compilers
and the MSYS2 environment. The result is a static and a dynamic DLL, as well as the
appropriate header files, so that libcaer can be used in MinGW itself.
Visual Studio and the MSVC compiler are not supported out-of-the-box right now, to use
a DLL compiled by MinGW additional steps are necessary:
Following are detailed step-by-step instructions to install the required
components and get everything building, we use MinGW64 here for the
64-bit Windows platform, if you want to build for 32-bit Windows, just replace all
mentions of 'x86_64' with 'i686'. Whenever you want to install a package, use
the MSYS2 shell, while to build code, use the MinGW32/64 shells!
1) Get MSYS2 from and download the appropriate installer.
Follow the instructions to install the system and update its packages. During the
system package upgrade, ignore any heap mismatch errors, and follow what the last
warning tells you to do (close the shell). The base system upgrade seems to break
the Start Menu shortcuts, so from now on start MSYS2 by going to its directory
'C:\msys64\' and double-clicking on 'msys2_shell.cmd'.
2) Install MinGW GCC: pacman -S mingw-w64-x86_64-gcc
3) Install Make/CMake: pacman -S make mingw-w64-x86_64-cmake
4) Install pkg-config: pacman -S mingw-w64-x86_64-pkg-config
5) Install libusb: pacman -S mingw-w64-x86_64-libusb
6) Place the libcaer source in a location easily accessible to MSYS2. We usually
put the source code into 'C:\msys64\home\libcaer\' and use TortoiseGit
( or git from the MSYS2 shell (pacman -S git) to get it.
7) Switch to the MinGW build shell, double-click on 'mingw64.exe' in 'C:\msys64\'.
8) Switch to the libcaer checkout directory: cd /home/libcaer/
9) Configure, run CMake: cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=/mingw64 .
10) Build, run Make: make
11) Install: make install
Congratulations, you now have a working libcaer on Windows! The output from that
last 'make install' will have told you exactly where all the DLLs and header
files are located on the file-system. You can now try building one of the
examples in the examples/ directory to verify functionality.