You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: COMPILING.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,13 @@
1
1
# Compiling DieKnow
2
2
3
+
This guide contains instructions on how to build DieKnow's C++ backend from scratch using CMake. The actions in Step 2 will depend on your choice of compiler. Steps 1 and 3 should be identical regardless of which compiler is chosen.
4
+
5
+
The minimum C++ standard version is C++ 17. However it is recommended to use C++ 20 for compiler optimizations for branch prediction hints.
6
+
3
7
> **Ensure you are on a Windows machine before attempting to compile!**
4
8
5
9
## 1) Installing CMake
6
10
7
-
### CMake
8
-
9
11
1. Navigate to the [CMake downloads page](https://cmake.org/download/) and download the latest **Windows x64 Installer**.
10
12
2. Run the installer according to the instructions on-screen. Make sure you click the checkbox "Add CMake to the PATH environment variable".
11
13
@@ -16,15 +18,15 @@ The compilers MSVC, Clang, and GCC are all supported.
16
18
### MSVC
17
19
18
20
> [!NOTE]
19
-
> Although it is the recommended and best-supported way to build DieKnow, installing MSVC requires administrator privileges. Choose GCC or Clang instead if you do not have them.
21
+
> Although it is the recommended and best-supported way to build DieKnow, **installing MSVC requires administrator privileges**. Choose GCC or Clang instead if you do not have them.
20
22
21
23
1. Download the [Visual Studio Build Tools](https://aka.ms/vs/stable/vs_BuildTools.exe).
22
-
2. Ensure that "Desktop development with C++" is checked and press "Install"
24
+
2. Ensure that "Desktop development with C++" is checked and press "Install".
23
25

24
26
25
27
### GCC/Clang
26
28
27
-
GCC and Clang can be used on Windows with MSYS2
29
+
GCC and Clang can be used on Windows with MSYS2.
28
30
29
31
1. Download the [MSYS2 installer](https://github.com/msys2/msys2-installer/releases/download/2024-07-27/msys2-x86_64-20240727.exe).
30
32
2. Open the MSYS2 installer and follow the instructions to install MSYS2. Copy the path that you inputted when asked. You'll need it later.
@@ -48,7 +50,7 @@ GCC and Clang can be used on Windows with MSYS2
48
50
49
51
6. Press the Windows key and type "Edit environment variables for your account".
50
52
7. On the top half of the screen, go to "Path".
51
-
8. Press Alt-E and then Alt-N
53
+
8. Press Alt-E and then Alt-N.
52
54
9. Paste the installation directory of MSYS2 you copied when installing MSYS2 and then type `mingw64\bin` to complete the path.
53
55
10. To check if it works, open up a Command Prompt window and type `g++` or `clang++`, depending on what compiler you chose. If it says something like "No input files" they have been added to PATH.
0 commit comments