11

I want to build this project :https://github.com/xmrig/xmrig according to the instructions here: https://github.com/xmrig/xmrig/wiki/Windows-Build, but when I try to run command below:

C:\Users\dmin\Documents\xmrig-2.3.1\build>cmake .. -G "Visual Studio 15 2017 Win
64"-T v140_xp -DCMAKE_BUILD_TYPE=Release  -DUV_INCLUDE_DIR=C:\Program Files\libu
v\include -DUV_LIBRARY=C:\Program Files\libuv\Release\lib\libuv.lib
CMake Error: Could not create named generator Visual Studio 15 2017 Win64-T

I got these errors:

CMake Error: Could not create named generator Visual Studio 15 2017 Win64-T

Generators
  Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
                                 Optional [arch] can be "Win64" or "IA64".
  Visual Studio 9 2008 [arch]  = Generates Visual Studio 2008 project files.
                                 Optional [arch] can be "Win64" or "IA64".
  Visual Studio 8 2005 [arch]  = Deprecated.  Generates Visual Studio 2005
                                 project files.  Optional [arch] can be
                                 "Win64".
  Borland Makefiles            = Generates Borland makefiles.
  NMake Makefiles              = Generates NMake makefiles.
  NMake Makefiles JOM          = Generates JOM makefiles.
  Green Hills MULTI            = Generates Green Hills MULTI files
                                 (experimental, work-in-progress).
  MSYS Makefiles               = Generates MSYS makefiles.
  MinGW Makefiles              = Generates a make file for use with
                                 mingw32-make.
  Unix Makefiles               = Generates standard UNIX makefiles.
  Ninja                        = Generates build.ninja files.
  Watcom WMake                 = Generates Watcom WMake makefiles.
  CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files.
  CodeBlocks - NMake Makefiles = Generates CodeBlocks project files.
  CodeBlocks - NMake Makefiles JOM
                               = Generates CodeBlocks project files.
  CodeBlocks - Ninja           = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
  CodeLite - MinGW Makefiles   = Generates CodeLite project files.
  CodeLite - NMake Makefiles   = Generates CodeLite project files.
  CodeLite - Ninja             = Generates CodeLite project files.
  CodeLite - Unix Makefiles    = Generates CodeLite project files.
  Sublime Text 2 - MinGW Makefiles
                               = Generates Sublime Text 2 project files.
  Sublime Text 2 - NMake Makefiles
                               = Generates Sublime Text 2 project files.
  Sublime Text 2 - Ninja       = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
                               = Generates Sublime Text 2 project files.
  Kate - MinGW Makefiles       = Generates Kate project files.
  Kate - NMake Makefiles       = Generates Kate project files.
  Kate - Ninja                 = Generates Kate project files.
  Kate - Unix Makefiles        = Generates Kate project files.
  Eclipse CDT4 - NMake Makefiles
                               = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - MinGW Makefiles
                               = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Ninja         = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.

How I can solve it?

PS: it's not duplicated as there's no answer CMake Error: Could not create named generator Visual Studio 14 2015 win64

Thank you

evanhutomo
  • 627
  • 1
  • 11
  • 24
Nizar
  • 1,112
  • 4
  • 17
  • 29
  • First add a single space after your closing quote: `[...] Win64" -T [...]` – oLen Oct 04 '17 at 11:06
  • Now i get CMake Error: The source directory "C:/Users/dmin/Documents/xmrig-2.3.1/build/Fil es/libuv/Release/lib/libuv.lib" does not exist. :( – Nizar Oct 04 '17 at 11:18
  • But this is yet another error. It states that you are missing dependency libuv.lib required for building your project. Check if it's really not present where it should and if not troubleshoot another issue which most probably is not CMake related. – Jacek Blaszczynski Oct 07 '17 at 13:18

3 Answers3

2

Looking at error message it says that there is no:

Visual Studio 15 2017 Win64-T

As you may notice cmake parsed your command merging Win64" and -T option. In command line you pasted:

there is no space between Win64" and -T.

Add one and run command again.

Jacek Blaszczynski
  • 3,183
  • 14
  • 25
  • so does this mean that I need to install Visual studio on Windows machine? I am just trying to run an older Android project which is failing with same above error. – Nah Mar 25 '19 at 13:52
1

The issue is due to the old CMake version, update your CMake and try. You can check the version of your CMake by running CMake --version. you should install CMake to the latest available version. Sometimes if you already have the latest CMake installed, but your CMake --version is showing an old version that means your CMake is being picked up from some other place. Check your environment variable PATH and move your Cmake installation bin path to the top of the PATH list.

0

I HAD THE SAME ISSUE. But my problem was, I had Cygwin installed, and Cygwin had their own built-in version of C-make. What I did was- untie Cygwin from my command prompt (cmd), then rebuilt it. It then worked. Make sure you don't have something tied into your command prompt (cmd), like Cygwin, because they have their own version of 'Cmake'.

One way of checking this out is by typing in 'cygwin' into your command prompt (cmd), or into your search, and try tracing its file origin, and try removing its ties from command prompt, or by just uninstalling the app which utilizes a different version of Cmake.