-
Notifications
You must be signed in to change notification settings - Fork 5
Building CRHMcode GCC
jhs507 edited this page Sep 24, 2024
·
8 revisions
A installation script is provided in crhmcode/crhmcode/src/install_crhm.sh when executed with super user permissions ie sudo ./install_crhm.sh it will install crhm into /usr/local and place the crhmConfig.h header in /usr/include
- Checkout desired branch from this repository (or download the source distribution zip file from one of the listed releases and skip to step 6)
- Download boost from https://www.boost.org/users/history/version_1_75_0.html
- Decompress the downloaded boost archive
- Place the boost_1_75_0 directory in crhmcode/crhmcode/src/libs directory
- Initialize the spdlog submodule by running the commands
git submodule initandgit submodule update - Create a build folder at crhmcode/crhmcode/build.
- Change directories to the build folder
cd crhmcode/crhmcode/build - Configure the project with CMake
cmake ../src - Build the project with CMake
cmake --build . - The build folder will contain the crhm executable which can then be moved to any convenient location
This method uses the Windows Subsystem For Linux which allows you to run Linux distributions directly under your Windows 10 or 11 OS. This method is rec
- Install WSL2 using the instructions found here: https://learn.microsoft.com/en-us/windows/wsl/install#install-wsl-command Following these instructions will install a Ubuntu distribution.
- Run the Ubuntu application to open the Ubuntu command line. (You can search for "Ubuntu" in the start menu to find the application)
- Run the command:
sudo apt update - Run the command:
sudo apt upgrade - Run the command:
sudo apt install build-essential - Run the command:
sudo apt install cmake - Follow the Ubuntu installation instructions above
This method uses MSYS2 and MinGW to allow you to run some programs in a Linux-like environment. This method is less recommended as most testing of CRHM takes place within an Ubuntu environment.
- Install MSYS2 following the directions found here: https://www.msys2.org/#installation
- From the start menu run "MSYS MinGW 64-bit" (You will need to "run as administrator")
- In the MSYS MinGW console navigate to the crhmcode/crhmcode directory
- Run the command
pacman -S mingw-w64-x86_64-toolchain - Run the command
pacman -Qs make - Run the command
pacman -S mingw-w64-x86_64-cmake - Follow the Ubuntu installation instructions above