# Newbie needs help on Step4

**URL:** https://discourse.cmake.org/t/newbie-needs-help-on-step4/5722
**Category:** Usage
**Created:** [May 24, 2022, 11:42am UTC](https://discourse.cmake.org/t/newbie-needs-help-on-step4/5722 "2022-05-24T11:42:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![BlueFlash](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@BlueFlash](https://discourse.cmake.org/u/BlueFlash)
#### Post date: [May 24, 2022, 11:42am UTC](https://discourse.cmake.org/t/newbie-needs-help-on-step4/5722/1 "2022-05-24T11:42:42Z")

</div>

I’m completely new to CMake, so I’m running through the Tutorial.  
Everything seems to be working fine, until I reach Step4.  
[https://cmake.org/cmake/help/latest/guide/tutorial/Installing%20and%20Testing.html](https://cmake.org/cmake/help/latest/guide/tutorial/Installing%20and%20Testing.html)

I have cmake installed in c:\program files\cmake and the code files in C:\Cmake\cmake-3.20.3\Help\guide\tutorial

Iam using Visual Studio Code as coding tool.

After going through the steps (Up to ‘Testing Support’), I have created Step4\_build folder and I’m executing the build:

**PS C:\Cmake\cmake-3.20.3\Help\guide\tutorial\Step4\_build\> & ‘C:\Program Files\cmake\bin\cmake’ …\Step4**  
– Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.  
– Configuring done  
– Generating done  
– Build files have been written to: C:/Cmake/cmake-3.20.3/Help/guide/tutorial/Step4\_build  
**PS C:\Cmake\cmake-3.20.3\Help\guide\tutorial\Step4\_build\> & ‘C:\Program Files\cmake\bin\cmake’ --build .**  
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Framework  
Copyright (C) Microsoft Corporation. All rights reserved.

MathFunctions.vcxproj → C:\Cmake\cmake-3.20.3\Help\guide\tutorial\Step4\_build\MathFunctions\Debug\MathFunctions.lib

Tutorial.vcxproj → C:\Cmake\cmake-3.20.3\Help\guide\tutorial\Step4\_build\Debug\Tutorial.exe

But when I’m trying to create the install

**PS C:\Cmake\cmake-3.20.3\Help\guide\tutorial\Step4\_build\> & ‘C:\Program Files\cmake\bin\cmake’ --install .**  
– Install configuration: “Release”  
CMake Error at cmake\_install.cmake:39 (file):  
file cannot create directory: C:/Program Files (x86)/Tutorial/bin. Maybe need administrative privileges.

So I used the prefix solution  
**PS C:\Cmake\cmake-3.20.3\Help\guide\tutorial\Step4\_build\> & ‘C:\Program Files\cmake\bin\cmake’ --install . --prefix "C:\Cmake\cmake-3.20.3\Help\guide\tutorial\Step4\_build"**  
CMake Error at cmake\_install.cmake:39 (file):  
file INSTALL cannot find  
“C:/Cmake/cmake-3.20.3/Help/guide/tutorial/Step4\_build/Release/Tutorial.exe”:  
No error.

If the intall fails, then why is it “No Error”. But why did it fail in the first place.

Can someone help to find out what’s wrong?

I compared the modified Step4 folder with the Step5 folder and all files are completely identical.

Any support is appreciated.

Kind regards

BlueFlash

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 24, 2022, 1:25pm UTC](https://discourse.cmake.org/t/newbie-needs-help-on-step4/5722/2 "2022-05-24T13:25:32Z")

</div>

It seems that your install prefix is somewhere in a place that your user does not have rights to. I suppose this should be mentioned in the docs.

Cc: @betsy.mcphail

---

<div class="post-metadata">

### Author: ![jtxa](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jtxa/32/1535_2.png) [@jtxa](https://discourse.cmake.org/u/jtxa)
#### Post date: [May 24, 2022, 11:27pm UTC](https://discourse.cmake.org/t/newbie-needs-help-on-step4/5722/3 "2022-05-24T23:27:27Z")

</div>

Based on the output you have built the “Debug” configuration, but the installation tried to install a “Release” configuration.

As I do not have experience with the VS or other MultiConfig generators, I’m not sure about the solution. But try to add a `--config Release` to your build command.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 25, 2022, 2:30pm UTC](https://discourse.cmake.org/t/newbie-needs-help-on-step4/5722/4 "2022-05-25T14:30:00Z")

</div>

That might be another issue, but I don’t think a config mismatch would be the root cause of permission denied errors on a directory that either would want.

---

<div class="post-metadata">

### Author: ![jtxa](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jtxa/32/1535_2.png) [@jtxa](https://discourse.cmake.org/u/jtxa)
#### Post date: [May 25, 2022, 4:25pm UTC](https://discourse.cmake.org/t/newbie-needs-help-on-step4/5722/5 "2022-05-25T16:25:23Z")

</div>

Yes, that first install command lacks permission as the error message says:

> [@BlueFlash](#):
>
> C:/Program Files (x86)/Tutorial/bin. Maybe need administrative privileges.

For the default program directories on Windows you usually need admin rights.  
In case of a exe/msi Installer, you usually get a Popup to input your credentials. But I assume here the make just tries to copy the files.

Perhaps the tutorial should mention that installations to the default directories often require sudo/admin rights. And if you don’t have them you need to use a prefix, which is also explained in the tutorial.
