# Typo in CMake Tutorial » Step 2: Adding a Library

**URL:** https://discourse.cmake.org/t/typo-in-cmake-tutorial-step-2-adding-a-library/8869
**Category:** Site Feedback
**Created:** [September 2, 2023, 7:33pm UTC](https://discourse.cmake.org/t/typo-in-cmake-tutorial-step-2-adding-a-library/8869 "2023-09-02T19:33:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pokorj54](https://discourse.cmake.org/user_avatar/discourse.cmake.org/pokorj54/32/3775_2.png) [@pokorj54](https://discourse.cmake.org/u/pokorj54)
#### Post date: [September 2, 2023, 7:33pm UTC](https://discourse.cmake.org/t/typo-in-cmake-tutorial-step-2-adding-a-library/8869/1 "2023-09-02T19:33:12Z")

</div>

In the tutorial it is said to

> Lastly, replace `sqrt` with our library function `mathfunctions::mysqrt`.

However, the function`mysqrt` is in namespace `mathfunctions::detail` not just `mathfunctions`. There is a wrapper `mathfunctions::sqrt` which I believe should be mentioned instead. It is also written that way in the solution.

---

<div class="post-metadata">

### Author: ![betsy.mcphail](https://discourse.cmake.org/user_avatar/discourse.cmake.org/betsy.mcphail/32/299_2.png) [@betsy.mcphail](https://discourse.cmake.org/u/betsy.mcphail)
#### Post date: [September 7, 2023, 3:01pm UTC](https://discourse.cmake.org/t/typo-in-cmake-tutorial-step-2-adding-a-library/8869/2 "2023-09-07T15:01:14Z")

</div>

Thanks for catching this! I created a MR with a fix for the typo along with some other minor tutorial issues here: [https://gitlab.kitware.com/cmake/cmake/-/merge\_requests/8779](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8779)

---

<div class="post-metadata">

### Author: ![CoolMood](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/ecc23a/32.png) [@CoolMood](https://discourse.cmake.org/u/CoolMood)
#### Post date: [January 22, 2024, 4:11pm UTC](https://discourse.cmake.org/t/typo-in-cmake-tutorial-step-2-adding-a-library/8869/3 "2024-01-22T16:11:41Z")

</div>

This is a heads up for others if they encounter similar errors during Step 2 Exercise 1.

IDE: VSCodium 1.85.2  
Extensions: clangd v0.1.26, CMake, CMake Tools, CodeLLDB  
Compiler: GCC 13.2.0 x86\_64-w64-mingw  
CMake: cmake-3.28.0-windows-x86\_64  
Tutorial: cmake-3.28.1-tutorial-source.zip

I copied the solutions to TODO 1 through 4 to the relevant files.

Step 2 Exercise 1 TODO 5: Include MathFunctions.h

#include “MathFunctions.h”

Error: ‘MathFunctions.h’ file not found

Step 2 Exercise 1 TODO 6: Replace sqrt with mathfunctions::sqrt

const double outputValue = mathfunctions::sqrt(inputValue)

Error: Use of undeclared identifier ‘mathfunctions’

The cmake build works okay, but it’s confusing to see the errors from the clangd extension.
