# Tutorial Step 1 Possible Oversight?

**URL:** https://discourse.cmake.org/t/tutorial-step-1-possible-oversight/9805
**Category:** Site Feedback
**Created:** [January 10, 2024, 1:22am UTC](https://discourse.cmake.org/t/tutorial-step-1-possible-oversight/9805 "2024-01-10T01:22:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![BrazenBunnies](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brazenbunnies/32/4149_2.png) [@BrazenBunnies](https://discourse.cmake.org/u/BrazenBunnies)
#### Post date: [January 10, 2024, 1:22am UTC](https://discourse.cmake.org/t/tutorial-step-1-possible-oversight/9805/1 "2024-01-10T01:22:22Z")

</div>

I’ve just finished Step 1 of the tutorial and I got stuck for a while on TODO 10. I’ve figured it out now but thought I’d put a word in here about it.

TODO 7 asks us to specify the version as 1.0 in CMakeLists.txt. We later use configure\_file() to create the TutorialConfig.h file in the builds directory. However, when I finished the section up and tried to build, I got an error saying that Tutorial\_VERSION\_MINOR was undeclared.

I believe this is because when Tutorial\_VERSION\_MINOR is zero, configure\_file() considers it to be “OFF.” This is corroborated by the TutorialConfig.h file in the builds directory, which looks like this:

```auto
#define Tutorial_VERSION_MAJOR "1"
/* #undef Tutorial_VERSION_MINOR */

```

If I make the version 0.0, TutorialConfig.h looks like this:

```auto
/* #undef Tutorial_VERSION_MAJOR */
/* #undef Tutorial_VERSION_MINOR */

```

I’m not sure if I have a slightly different system or if I missed something, but I followed the instructions quite closely. I’m not sure how other people didn’t run into this problem to be honest.

---

<div class="post-metadata">

### Author: ![dnglaze](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/d/74df32/32.png) [@dnglaze](https://discourse.cmake.org/u/dnglaze)
#### Post date: [January 10, 2024, 3:43am UTC](https://discourse.cmake.org/t/tutorial-step-1-possible-oversight/9805/2 "2024-01-10T03:43:11Z")

</div>

What does your `TutorialConfig.h.in` file look like? I just tried it out following the tutorial steps and it works as expected. Did you by chance use `#cmakedefine`? That would have the behavior you’ve described. If you just use a normal `#define`, it should work. That’s what TODO 10 has specified.

---

<div class="post-metadata">

### Author: ![BrazenBunnies](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brazenbunnies/32/4149_2.png) [@BrazenBunnies](https://discourse.cmake.org/u/BrazenBunnies)
#### Post date: [January 10, 2024, 4:01am UTC](https://discourse.cmake.org/t/tutorial-step-1-possible-oversight/9805/3 "2024-01-10T04:01:26Z")

</div>

Oh yeah that’s exactly it, I got caught up a bit in the `configure_file()` documentation. I mistook `#cmakedefine` for the standard syntax of the .h.in files. Thanks!
