All About BTC, LTC, ETH mining as well as other alternative crypto currencies
It seems that a lot of people are having trouble figuring out how to compile CudaMiner from source for Windows and since our readers have also requested a simple and easy to use guide, we have prepared something that should help. The process is pretty simple and straight forward, so if you follow the steps you should be able to compile the code yourself in no time, probably…
First Download the required files:
– You need to have Visual Studio 2010 or 2012 with C++ installed, other versions might also work, but we have not tested.
– Download and install Nvidia CUDA Toolkit, do note that Visual Studio needs to be installed first for the CUDA Toolkit to properly work with it.
– You need to download the Windows versions of pthreads, OpenSSL and curl for the respective version you will be compiling for (32 or 64-bit), there is a complete package that contains all of these to make it simple for you, though they may not be the latest versions.
– Download the latest CudaMiner source code, use the Download ZIP button on the right to make it easier.
Prepare everything for compiling the project:
– Create a folder where you will place all of the required files, for example CUDAMINER-WIN and extract the complete package of prerequisites in it as well as the source code of CudaMiner, you should have things look like on the image above.
– Open the CudaMiner-master folder and open the cudaminer.sln project file, it should load up in Visual Studio. Note that the project is in VS2010 format and if using 2012 for example you will be asked to upgrade the project to the 2012 format, choose yes.
Final tweaks and compiling the project in Visual studio:
– Make Sure you have selected Release build and choose if you are compiling a 32 or 64-bit version inside Visual Studio after you have opened up the cudaminer SLN file.
– If you wan to compile the code for a specific GPU architecture other than the default you will need to go to Project, Properties, Confguration Properties, CUDA C/C++, Device and select the required ones under Code Generation.
– Select Build Solution from the Build menu and wait for the compilation process to finish, you will find the executable file in the Release folder (or x64, Release for the 64-bit version).
– You need the cudaminer.exe executable file and the respective cudart DLL file (32 or 64-bit, depending on the version you are building).
– You also need to get the respective 32 or 64-bit version of the pthreadVC2.dll file from the phtreads folder.
– Put the executable file and the two DLL files in a single folder and you are ready to run CudaMiner.
– Note that on your system everything should be working fine, but on other computers lacking Visual C++ Redistributable for Visual Studio 2010/2012 installed you will need to also install this package (version depends on what version of Visual Studio you have used to compile the project). Alternatively you can just include the msvcp and msvcr DLL files along with the other files to make sure you have all of the required files packaged together.
Hopefully this guide will help you compile the CudaMiner source code for Windows on your own, this could also be helpful in compiling other projects if you haven’t used Visual Studio at all, though the guide is specifically for compiling CudaMiner.