forked from chiragmajithia/libcaer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Windows
44 lines (32 loc) · 2.16 KB
/
README.Windows
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
WINDOWS BUILD INSTRUCTIONS
==========================
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 again in MinGW or also together
with Visual Studio C/C++. 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 https://msys2.github.io/ 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: 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
(https://tortoisegit.org/) 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.