# Visual Studio 2022 Preview's MSVC fails to compile the latest CMake sources

**URL:** https://discourse.cmake.org/t/visual-studio-2022-previews-msvc-fails-to-compile-the-latest-cmake-sources/5445
**Category:** Development
**Tags:** os:windows, comp:msvc
**Created:** [April 12, 2022, 5:29am UTC](https://discourse.cmake.org/t/visual-studio-2022-previews-msvc-fails-to-compile-the-latest-cmake-sources/5445 "2022-04-12T05:29:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![objectx](https://discourse.cmake.org/user_avatar/discourse.cmake.org/objectx/32/1067_2.png) [@objectx](https://discourse.cmake.org/u/objectx)
#### Post date: [April 12, 2022, 5:29am UTC](https://discourse.cmake.org/t/visual-studio-2022-previews-msvc-fails-to-compile-the-latest-cmake-sources/5445/1 "2022-04-12T05:29:29Z")

</div>

Missing some `#include`?

```auto
C:\buildkite-agent\builds\windows-3\objectx\cmake\Utilities\cmcurl\lib\curl_sspi.c(155,29): error C2065: 'strdup': undeclared identifier [C:\buildkite-agent\builds\windows-3\objectx\cmake\00.BUILD\Stage1\Utilities\cmcurl\lib\cmcurl.vcxproj]

```

---

<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: [April 12, 2022, 11:57am UTC](https://discourse.cmake.org/t/visual-studio-2022-previews-msvc-fails-to-compile-the-latest-cmake-sources/5445/2 "2022-04-12T11:57:00Z")

</div>

Thanks for the report. It looks like something is up with `curl_multibyte.h` here. It seems that `WIN32` is no longer defined? In any case, that `#else` should probably `#include <string.h>` for its impls.

FYI @brad.king
