-
Notifications
You must be signed in to change notification settings - Fork 34
Compiling on Windows with Visual Studio 2019
Bazza-Carter edited this page Jul 13, 2022
·
13 revisions
- 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.
- Install Git using the official installer
- During Git installation, make sure to select "commit Unix-style line endings" when prompted
- Install CMake using the CMake Installer: https://cmake.org/download/
- During CMake installation make sure to add CMake to system PATH
- Install Visual Studio Community 2019: https://visualstudio.microsoft.com/en/downloads/
- During installation check "C++ for desktop applications" and click "Install"
- 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)
- 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
- Copy
build\openminer.exe
to the root of the project and run it
- Open a
cmd.exe
in OpenMiner folder - Run
build\Debug\openminer.exe
- Open a PowerShell in OpenMiner folder
- Run
.\build\Debug\openminer.exe
- If you have issues with missing DLLs, they may be in
build
folder, try to move them next toopenminer.exe
- Please open an issue if you encounter this kind of problem