qwe
qwe

Reputation: 35

'nmake' is not recognized as an internal or external command

i want to build c ++ library "botan" according to this instruction: https://botan.randombit.net/handbook/building.html (for Windows)

the second command is this: nmake.

in the result I get 'nmake' is not recognized as an internal or external command

After i tried to open nmake.exe, ended up getting this result: cl /DBOTAN_DLL=__declspec(dllexport) /EHs /GR /D_WIN32_WINNT=0x0600 /MD /bigobj /O2 /Oi -DBOTAN_IS_BEING_BUILT /W4 /wd4250 /wd4251 /wd4275 /wd4127 /Ibuild\include /Ibuild\include\external /nologo /c C:/botan/botan/Botan-2.17.2/src/lib/asn1/alg_id.cpp /Fobuild\obj\lib\asn1_alg_id.obj

'cl' is not recognized as an internal or external command

NMAKE : fatal error U1077: cl : returned code "0x1"

Stop.

Question: how can I connect nmake, or how to build a botan library?

Upvotes: 3

Views: 21867

Answers (3)

Mostafa Farrag
Mostafa Farrag

Reputation: 74

I had the same issue and found the nmake in the following directory

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64

inside the MSVC directory i found two versions installed and the only added the latest version to my PATH environment variableenter image description here

Upvotes: 0

Kunal Patrikar
Kunal Patrikar

Reputation: 11

For me, running VsDevCmd.bat did not work. I had nmake executable in the path "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64"

Add it to Path System Environment variable, restart command prompt and it worked.

Reference: https://github.com/Z3Prover/z3/issues/4756#issuecomment-717358194

Upvotes: 1

MSalters
MSalters

Reputation: 179779

The build instructions assume nmake is somewhere on the PATH. If you run a random cmd shell, this probably won't be the case. Furthermore, nmake assumes the other executables will also be on the PATH.

With Visual Studio, there's a Visual Studio Command Prompt. This is a batch file in the installation folder. Running this will set the PATH to that specific Visual Studio install. As a result, you can run the nmake belonging to that Visual Studio install.

Upvotes: 6

Related Questions