Skip to content

Building CRHMcode GCC

jhs507 edited this page Mar 24, 2022 · 7 revisions

Building CRHMcode GCC

Using the install script

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

Ubuntu and Linux Variants:

  1. Checkout desired branch from this repository
  2. Download boost from https://www.boost.org/users/history/version_1_75_0.html
  3. Decompress the downloaded boost archive
  4. Place the boost_1_75_0 directory in crhmcode/crhmcode/src/libs directory
  5. Initialize the spdlog submodule by running the commands git submodule init and git submodule update
  6. Create a build folder at crhmcode/crhmcode/build.
  7. Change directories to the build folder cd crhmcode/crhmcode/build
  8. Configure the project with CMake cmake ../src
  9. Build the project with CMake cmake --build .
  10. The build folder will contain the crhm executable

Windows

  1. Install MSYS2 following the directions found here: https://www.msys2.org/#installation
  2. From the start menu run "MSYS MinGW 64-bit" (You will need to "run as administrator").
  3. In the MSYS MinGW console navigate to the crhmcode/crhmcode directory.
  4. Follow steps 1 - 10 from the above directions.

Installing the executable

After completing the build step above you can also install the executable so that it can be accessed from anywhere.

  1. Navigate to the build directory.
  2. Run the command "make install".
  3. The program will be installed at /usr/local and its configuration file will be placed in /usr/include