# cmake include directories error in Vs Code

**URL:** <https://discourse.cmake.org/t/cmake-include-directories-error-in-vs-code/6798>\
**Category:** Code\
**Created:** [November 5, 2022, 3:55pm UTC](https://discourse.cmake.org/t/cmake-include-directories-error-in-vs-code/6798 "2022-11-05T15:55:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dr-Itachi](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dr-itachi/32/2899_2.png) [@Dr-Itachi](https://discourse.cmake.org/u/Dr-Itachi)\
**Post date:** [November 5, 2022, 3:55pm UTC](https://discourse.cmake.org/t/cmake-include-directories-error-in-vs-code/6798/1 "2022-11-05T15:55:36Z")

</div>

Hi. I’m having cmake include directories errors when I import my project from STM32CubeIDE in VS Code using the Microsoft Embedded Tools extension. I don’t know what is need to be done here as things are auto generated. the error is something like “Invalid character (‘:’) in a variable name: ‘workspace\_loc’”

Moderator edit: Files below uploaded on behalf of original poster

[CMakeOutput.log](https://discourse.cmake.org/uploads/short-url/2GlnmoSnorNII2i8H36ghkKvQvc.log) (55.6 KB)

 ![Capture_d_écran_2022-11-05_à_12.34.36](https://discourse.cmake.org/uploads/default/original/2X/b/b07bde1fba4fe6e16ebb118d656b3968e113dfa9.jpeg)

---

<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:** [November 6, 2022, 1:11pm UTC](https://discourse.cmake.org/t/cmake-include-directories-error-in-vs-code/6798/2 "2022-11-06T13:11:07Z")

</div>

I see `${workspace_loc:` which errors when it hits the `:` since it is not allowed in variable names. Something is wrong with the `st-project.cmake` code, but it’s hard to know what with the provided details.

---

<div class="post-metadata">

**Author:** ![Dr-Itachi](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dr-itachi/32/2899_2.png) [@Dr-Itachi](https://discourse.cmake.org/u/Dr-Itachi)\
**Post date:** [November 7, 2022, 12:17am UTC](https://discourse.cmake.org/t/cmake-include-directories-error-in-vs-code/6798/3 "2022-11-07T00:17:54Z")

</div>

how can i solve the issue then please ? removing the : didn’t change anything

---

<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:** [November 7, 2022, 12:29am UTC](https://discourse.cmake.org/t/cmake-include-directories-error-in-vs-code/6798/4 "2022-11-07T00:29:43Z")

</div>

I’d file an issue with whichever project provides that `st-project.cmake`. If this is one of your projects, more context is necessary to know what might be the intention here. I might hazard that it should be a `}` instead.

---

<div class="post-metadata">

**Author:** ![Dr-Itachi](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dr-itachi/32/2899_2.png) [@Dr-Itachi](https://discourse.cmake.org/u/Dr-Itachi)\
**Post date:** [November 7, 2022, 3:54pm UTC](https://discourse.cmake.org/t/cmake-include-directories-error-in-vs-code/6798/5 "2022-11-07T15:54:58Z")

</div>

Hi. I’ve tried it it didn’t work

---

<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:** [November 7, 2022, 4:36pm UTC](https://discourse.cmake.org/t/cmake-include-directories-error-in-vs-code/6798/6 "2022-11-07T16:36:48Z")

</div>

I’m afraid that without further context, anything else is just a guess. I highly recommend you talk to `st-project.cmake`’s authors to figure out what is intended here.

---

<div class="post-metadata">

**Author:** ![Dr-Itachi](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dr-itachi/32/2899_2.png) [@Dr-Itachi](https://discourse.cmake.org/u/Dr-Itachi)\
**Post date:** [November 7, 2022, 4:50pm UTC](https://discourse.cmake.org/t/cmake-include-directories-error-in-vs-code/6798/7 "2022-11-07T16:50:02Z")

</div>

Hi. they replied to me. seems like it is a bug. incorrect handling of the workspace\_loc variable. Thanks for your time
