'cmake' is not recognised as an internal o

2019-01-25 06:45发布

I'm trying run cmake, in visual studio 10, for esys-particle-win.

here is our path to cmake C:\Program Files (x86)\CMake 2.8\bin\cmake.exe

here is our path to esys-particle-win

C:\esys-particle-win\trunk\buildvs2010\mkvs10.bat

and this is the code we are entering in administrator command promt visual studio 2010

cd c:\esys-particle-win\trunk\buildvs2010
mkvs10.bat

and we get the error

'cmake' is not recognised as an internal or external command

inside the file mkvs10.bat is

cmake .. -G "Visual Studio 10" -G "NMake Makefiles"

could anyone tell me what i'm doing wrong. also i know nothing about programming i'm just following the instructions of this site

https://launchpadlibrarian.net/139659869/esys-particle-win-%28v2.1%29-build-instructions.pdf

in section 2.3.1

any help would be greatly appreciated, thankyou

3条回答
趁早两清
2楼-- · 2019-01-25 07:18

The error message means it cannot find cmake.
You can add its location to your path from the prompt like this:

set PATH="C:\Program Files (x86)\CMake 2.8\bin\";%PATH%
查看更多
对你真心纯属浪费
3楼-- · 2019-01-25 07:26

As @doctorlove mentioned above, the error message means it cannont find Cmake.

Note that quotes aren't needed in PATH environmental variables on Windows. So the above example on Windows would look like:

set PATH=C:\Program Files (x86)\CMake 2.8\bin\;%PATH% 

I had the same issue, and resolved it in this post.

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-01-25 07:31

I'm trying to build a project with my recently downloaded Visual Studio Community 2017, but had no CMake on my path.

It did not help, even after I had gained VCVars: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64

Instead of separately installing a copy that might work with these answers, although I'm not sure it would have the generators I need(?), I found one in the installation directory, which had a different path than what was in the guide I was using.

Here is my invocation line: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -G "Visual Studio 15 2017" -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ..

查看更多
登录 后发表回答