# How to build a library using the Clang C++ on Windows

**URL:** <https://discourse.glfw.org/t/how-to-build-a-library-using-the-clang-c-on-windows/1296>\
**Category:** support\
**Created:** [March 16, 2019, 9:34pm UTC](https://discourse.glfw.org/t/how-to-build-a-library-using-the-clang-c-on-windows/1296 "2019-03-16T21:34:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![frkhnyvmre](https://avatars.discourse-cdn.com/v4/letter/f/c57346/32.png) [@frkhnyvmre](https://discourse.glfw.org/u/frkhnyvmre)\
**Post date:** [March 16, 2019, 9:34pm UTC](https://discourse.glfw.org/t/how-to-build-a-library-using-the-clang-c-on-windows/1296/1 "2019-03-16T21:34:24Z")

</div>

Hello, please tell me how can i build your library using Clang on Windows? I use the editor Visual Code.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [March 16, 2019, 9:55pm UTC](https://discourse.glfw.org/t/how-to-build-a-library-using-the-clang-c-on-windows/1296/2 "2019-03-16T21:55:56Z")

</div>

I’ve not used clang to compile GLFW, however you can use CMake to generate Visual Studio project files and then switch to clang as per [this article on Visual Studio and Clang](https://devblogs.microsoft.com/cppblog/use-any-c-compiler-with-visual-studio/).

For Visual Studio Code I’m not sure, you’ll have to look into the Visual Studio Code documentation. You should be able to just add the relevant files to the project and set up the relevant compile & link options as per the generated Visual Studio project.
