Compiling on Windows with Visual Studio 2019 - Unarelith/OpenMiner GitHub Wiki
Before you start
- IMPORTANT: I highly recommend that you use the MinGW-w64 guide instead of this one.
- Note: OpenMiner is not built with optimization flags when using MSVC.
Step 1: Installation of required tools
Git
- Install Git using the official installer
- During Git installation, make sure to select "commit Unix-style line endings" when prompted
CMake
Visual Studio 2019
Step 2: OpenMiner compilation
- Open a PowerShell or
cmd.exe
- Clone the repository using
git clone https://github.com/Unarelith/OpenMiner
- Go inside OpenMiner folder using
cd OpenMiner
- Run these commands:
cmake -B build -G "Visual Studio 16 2019" .
cmake --build build
(you can continue reading instead of running this command if you want to compile using Visual Studio GUI)
Step 3: Running OpenMiner
Using Visual Studio
- Open
build/openminer.sln
with Visual Studio
- Right click on
openminer
project, then Properties → Debugging → Working Directory → Set to ..\..\..
- Go to solution properties → Common Properties → Startup Project and select Multiple startup projects
- Select Start for
openminer
- Reorder the list so that
openminer
is the first one
- Run the solution
Using File Explorer
- Copy
build\openminer.exe
to the root of the project and run it
Using cmd.exe
- Open a
cmd.exe
in OpenMiner folder
- Run
build\Debug\openminer.exe
Using PowerShell
- Open a PowerShell in OpenMiner folder
- Run
.\build\Debug\openminer.exe
Troubleshooting
- If you have issues with missing DLLs, they may be in
build
folder, try to move them next to openminer.exe