- Install gcc and gmp. We give detailed instructions below for getting these through MSYS2, but you can get it any way you like.
-
Install MSYS2.
-
Open the MSYS2 prompt by running the newly-created "MSYS2 MSYS" shortcut in your start menu.
-
Inside the prompt, run
pacman -Syu
, then close the window when it prompts you to. -
Reopen the MSYS2 prompt and run:
pacman -Syu pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gmp mingw-w64-x86_64-cmake make
(Yes, you should run
pacman -Syu
a second time.) -
Modify your
%Path%
to include the newly-installed software. You should include these two paths:C:\msys64\mingw64\bin C:\msys64\usr\bin
-
- Build the ElectionGuard library.
-
Open a command prompt and navigate to the directory with the ElectionGuard-SDK-C-Implementation repo.
-
Run the following commands:
cmake -S . -B build -G "MSYS Makefiles" .. cmake --build build
-
You should now have a
electionguard.a
orelectionguard.dll
(depending on the how cmake was configured).
-
- (Optional) Build the api example election driver.
-
Open a command prompt and navigate to the directory with the ElectionGuard-SDK-C-Implementation repo.
-
Run the following commands:
set PATH=%PATH%;C:\path\to\ElectionGuard-SDK-C-Implementation\build\ set CMAKE_PREFIX_PATH=C:\path\to\ElectionGuard-SDK-C-Implementation\build\ElectionGuard cmake -S examples/api -B api_build -G "MSYS Makefiles" cmake --build api_build --target api
-
You should now have a
api.exe
that simulates some random voters and generates election record artifacts.
-
This repository has been archived by the owner on May 13, 2024. It is now read-only.